首次登陆
mysql -u root -p
//没有密码
修改密码
use mysql
update user set authentication_string=password("123456") where user="root";
刷新权限
flush privileges;
mysql -u root -p
//没有密码
use mysql
update user set authentication_string=password("123456") where user="root";
flush privileges;