安装:
sudo apt-get update
sudo apt-get install mysql-server
配置远程访问:
vi /etc/mysql/mysql.conf.d/mysqld.conf
注释掉:
#bind-address 127.0.0.1
mysql -u root -p
grant all privileges on *.* to ‘root‘@‘%‘ identified by ‘xxxxxx‘; flush privileges;重启MySql即可。