ubuntu16.04安装mysql并配置远程访问

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


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章