1. 第一步进入MySQL库中
mysql -uroot -p
use mysql;
2. 然后创建新建一个账号
create user 'root'@'%' identified by '输入你自己的密码';
3. 给用户赋权
grant all privileges on *.* to 'root'@'%' with grant option;
flush privileges;
mysql -uroot -p
use mysql;
create user 'root'@'%' identified by '输入你自己的密码';
grant all privileges on *.* to 'root'@'%' with grant option;
flush privileges;