Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y == # 刷新授权表,让初始化后的设定立即生效== Success. All done!
然后保存退出
mysql -u root -p
mysql> grant all on *.* to root@'%' identified by '你的密码' with grant option;
mysql> flush privileges; # 刷新权限
mysql> exit
如下:
重启mysql:
systemctl restart mysql