开始实行底下三条吩咐:

sudo apt-get install mysql-server

sudo apt install mysql-client

sudo apt install libmysqlclient-dev

安置胜利后不妨经过底下的吩咐尝试能否安置胜利:

sudo netstat -tap | grep mysql

不妨经过如次吩咐加入mysql效劳:

mysql -uroot -p你的暗号

此刻树立mysql承诺长途考察,开始编纂文献/etc/mysql/mysql.conf.d/mysqld.cnf:

sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf

解释掉bind-address = 127.0.0.1:

生存退出,而后加入mysql效劳,实行受权吩咐:

grant all on *.* to root@’%’ identified by ‘你的暗号’ with grant option;

flush privileges;

而后实行quit吩咐退出mysql效劳,实行如次吩咐重启mysql:

sudo service mysql restart