Mysql连接数据库报错:Communications link failure
Communications link failure:通信链路故障第一步、1、在mysql下执行:use mysql2、修改访问权限,由于MySQL 8.0已经不支持这种命令写法grant all privileges on *.* to root@"%" identified by ".";,正确的写法为grant all privileges on *.* to 'root'@'%' ;参考
·
Communications link failure:通信链路故障
第一步、
1、在mysql下执行:use mysql
2、修改访问权限,由于MySQL 8.0已经不支持这种命令写法grant all privileges on *.* to root@"%" identified by ".";
,正确的写法为grant all privileges on *.* to 'root'@'%' ;
参考文章
3、然后输入select host,user from user;
查看权限是否更改,显示%则更改成功。
第二步、
打开3306端口
参考文章
第三步、
关闭防火墙systemctl stop firewalld
更多推荐
已为社区贡献1条内容
所有评论(0)