远程连接ubuntu下的mysql
2010-03-29 16:31
399 查看
一.问题:远程无法连接服务器ubuntu上的mysql
二.解决方法:
1.ubuntu登陆msql,创建一个可以使远程连接的 MySQL 用户, 用户名:admin,密码:admin
mysql>GRANT ALL PRIVILEGES ON *.* TO admin@"%" IDENTIFIED BY 'admin' WITH GRANT OPTION;
2.修改mysql的配置文件 /etc/mysql/my.cnf
找到
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
将
bind-address = 127.0.0.1 这一行注释掉,即改为
#bind-address = 127.0.0.1
3.重启mysql
sudo /etc/init.d/mysql restart
这样就可以使用 用户名:admin,密码:admin 远程连接数据库了
测试方法:mysql -h ubuntu的ip -u admin -p admin
二.解决方法:
1.ubuntu登陆msql,创建一个可以使远程连接的 MySQL 用户, 用户名:admin,密码:admin
mysql>GRANT ALL PRIVILEGES ON *.* TO admin@"%" IDENTIFIED BY 'admin' WITH GRANT OPTION;
2.修改mysql的配置文件 /etc/mysql/my.cnf
找到
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
将
bind-address = 127.0.0.1 这一行注释掉,即改为
#bind-address = 127.0.0.1
3.重启mysql
sudo /etc/init.d/mysql restart
这样就可以使用 用户名:admin,密码:admin 远程连接数据库了
测试方法:mysql -h ubuntu的ip -u admin -p admin
相关文章推荐
- 设置Ubuntu允许远程连接MySQL
- Ubuntu16.04下mysql的安装及远程连接配制
- ubuntu安装mysql后无法远程连接处理
- [mysql]腾讯云 ubuntu 远程连接mysql数据库配置
- Ubuntu16.04 server下配置MySQL,并开启远程连接的方法
- Ubuntu Server 下开启远程连接 MySQL
- Ubuntu 14.10 下MySQL无法远程连接问题
- Ubuntu MySQL允许远程连接访问
- Ubuntu下设置mysql允许远程连接
- Ubuntu下MySQL 远程连接设置
- 远程客户端无法连接ubuntu下Mysql
- 无法远程连接ubuntu下的mysql
- ubuntu下允许mysql远程连接
- ubuntu 与mysql的远程连接问题
- Ubuntu 18.04配置mysql以及配置远程连接的步骤
- ubuntu mysql 远程连接出错
- Ubuntu下MySQL的安装及远程连接配置等配置
- ubuntu下MySQL的安装及远程连接配置等配置
- 【MySQL错误系列】本地无法远程连接阿里云Ubuntu环境下Mysql数据库cant connect to mysql server on …..(10061)
- ubuntu虚拟机服务器远程连接+mysql连接