sudo apt install mysql-server mysql-client
啓動mysql服務
service mysql start
配置遠程訪問
grant all privileges on *.* to root@"%" identified by "your password" with grant option;
重新授權表
flush privileges;
修改配置文件
sudo gedit /etc/mysql/mysql.conf.d
註釋掉,即前邊加上‘#’
bind-address = 127.0.0.1
完成重啓mysql服務
service mysql restart