ubunto16.04 mysql安装 远程连接配置

sudo apt-get update
sudo apt-get install mysql-server
//进入数据库
mysql -u root -p
//数据库配置
use mysql;
update user set host = '%' where user = 'root';
grant all privileges on *.* to 'root'@'%' identified by '#####';
flush privileges;
quit;
//修改ip限制
sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf
//注释或者改ip
bind-address=127.0.0.1 ----->bind-address=0.0.0.0
//保存退出
//重启
sudo service mysql restart

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