ubuntu MySQL安装和设置

 1. apt-get install mysql-server
 2. apt-get isntall mysql-client

修改 /etc/mysql/my.cnf

#bind-address           = 127.0.0.1

本地登录

mysql -u root -p

grant all on *.* to root identified by '123456'

gedit /etc/mysql/mysql.conf.d/mysqld.cnf 

修改bindip

service mysql restart

原文地址:https://www.cnblogs.com/ahuo/p/5304822.html