标签:server bind bsp 编辑 ubuntu roo bash lib ddr
1.安装MYSQL:
root@ubuntu:~# sudo apt-get install mysql-server root@ubuntu:~# apt isntall mysql-client root@ubuntu:~# apt install libmysqlclient-dev
2.开启远程访问:
编辑mysql的配置文件:root@ubuntu:~# vi /etc/mysql/mysql.conf.d/mysqld.cnf,找到bind-address = 127.0.0.1这一行,注释该行
进入mysql:root@ubuntu:~# mysql -u root -p123456
在mysql中执行以下命令:
grant all on *.* to root@‘%‘ identified by ‘123456‘; flush privileges;
退出mysql: exit;
最后在终端中重启mysql:
root@ubuntu:~# /etc/init.d/mysql restart
标签:server bind bsp 编辑 ubuntu roo bash lib ddr
原文地址:http://www.cnblogs.com/xienb/p/7069575.html