1. 程式人生 > >ubuntu16.04 安裝mysql5.7

ubuntu16.04 安裝mysql5.7

依賴安裝:

sudo apt-get install libaio1 

安裝:

sudo apt-get install mysql

問題1:

來自:http://blog.csdn.net/dongwuming/article/details/9835983

$cd /var/lib/dpkg/info

$sudo rm -rf mysql*

$sudo apt-get -f install

$sudo apt-get  update

問題2:

遠端連線問題:1130 -host 'localhost' is not allowed to connect to this mysql server

解決方法:

可能是你的帳號不允許從遠端登陸,只能在localhost。這個時候只要在localhost的那臺電腦,登入mysql後,更改 "mysql" 資料庫裡的 "user" 表裡的 "host" 項,從"localhost"改稱"%"

mysql -u root -pvmwaremysql>use mysql;

mysql>update user set host = '%' where user = 'root';

mysql>select host, user from user;