保证能如命令行进入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 /etc/mysql/ -name "*.cnf" |xargs grep "bind-address"
./mysql.conf.d/mysqld.cnf:bind-address = 127.0.0.1
root@php56:/etc/mysql#
1045
GRANT ALL PRIVILEGES ON . TO 'root'@'%' IDENTIFIED BY 'A!abc123456.' WITH GRANT OPTION;
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。