MYSQ新增超级权限并允许远程访问:
GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'*' IDENTIFIED BY '123456' WITH GRANT OPTION;
update user set password=password('123456') where user='root';
FLUSH PRIVILEGES;
grant 高级 DBA 管理 MySQL 中所有数据库的权限。
grant all on *.* to dba@'localhost'
grant 普通数据用户,查询、插入、更新、删除 数据库中所有表数据的权利。
grant select on testdb.* to common_user@’%’
grant insert on testdb.* to common_user@’%’
grant update on testdb.* to common_user@’%’
grant delete on testdb.* to common_user@’%’
或者,用一条 MySQL 命令来替代:
grant select, insert, update, delete on testdb.* to common_user@'%'