Ubuntu 18.04 MYSQL 5.7 无法远程连接解决办法
第一
netstat -ntpl 查看3306监听在127.0.0.1 的话 改成监听IP为你的IP 或者为0.0.0.0
vi /etc/mysql/mysql.conf.d/mysqld.cnf
找到 bind-address = 127.0.0.1 去掉#注释改成
bind-address = 0.0.0.0
第二,更改
mysql -uroot -p 连接数据库执行如下命令
update mysql.user set authentication_string=PASSWORD('newPwd'), plugin='mysql_native_password',Host='%' where user='root';