linux登录到 mysql数据库:
mysql -uroot -p
输入密码
切换到mysql数据库
use mysql
执行代码
grant all privileges on *.* to root@"%" identified by "密码";
重新加载,并退出
exit
然后,重启数据库
service mysqld restart
防火墙也要关了,
systemctl stop firewalld.service
最后navicate连接数据库