Ubuntu下Mysql的安装

mysql安装

apt-get install mysql-server mysql-client

登陆

 mysql -u root -p

设置可以远程链接

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

把bind注释掉

打开mysql 修改mysql数据库下的user表中的root列HOTST为%

Use mysql

update user set host="%" where user="root";

重启

sudo /etc/init.d/mysql restart
原文地址:https://www.cnblogs.com/ingxx/p/7745473.html