授权 :grant all privileges on *.* to test@'%' identified by "123456";
刷新授权:flush privileges;
取消授权:revoke all privileges on *.* FROM 'test'@'%';
重新授权: GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER ON *.* TO 'test'@'%';
如果报错:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
可能登陆mysql方式有问题 不要用localhost登陆
改用:mysql -u -p -h 指定地址的方式进行登陆!
修改密码 :set password for 'test'@'%' = password('123');
删除用户:drop user test;