MYSQL (客户端)远程连接报10038错误的三行代码

保证能如命令行进入MYSQL

mysql> use mysql;

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root'
WITH GRANT OPTION

刷新权限

flush privileges; 

修改配置文件

/etc/mysql/my.conf或者在
/etc/mysql/mysql.conf.d
注释掉此行

#bind-address           = 127.0.0.1

如果找不到bind-address

root@php56:/etc/mysql# find ./ -name "*.cnf" |xargs grep "bind-address"
./mysql.conf.d/mysqld.cnf:bind-address        = 127.0.0.1
root@php56:/etc/mysql# 


    原文作者:牙小木木
    原文地址: https://segmentfault.com/a/1190000007566479
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞