[toc]
安装mysql
执行下面三条命令
1、sudo apt-get install mysql-server
2、sudo apt-get install mysql-client
3、sudo apt-get install libmysqlclient-dev
打开数据库
mysql -uroot -p
设置mysql允许远程访问
sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf
注释掉bind-address = 127.0.0.1

进入mysql,执行以下命令:
grant all on . to root@'%' identified by '你的密码' with grant option;
flush privileges;
退出mysql,然后重启mysql:
service mysql restart
网友评论