mysql create user grant privileges

create user 'aaa'@'%' identified by 'aaaaaa';

grant all privileges on *.* to 'aaa';

commit;

flush privileges;


用root登录,

use mysql;

然后把user表清一下:

delete from user where User = 'root' and Host != 'localhost';

delete from user where User ="";

delete from user where User is null;


用root登录,然后把root密码设置一下:

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass');

猜你喜欢

转载自blog.csdn.net/u_1_n_2_i_3/article/details/53169188
今日推荐