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