Mysql的远程访问
来源:互联网 发布:小米淘宝商城 编辑:程序博客网 时间:2024/05/01 09:37
在虚拟机里安装好ubuntu后,
然后就开始Mysql的远程访问,以下转自某擦肩而过的博客
要通过远程连接MySQL,需要做两步:
第一步是要创建一个可以远程连接的 MySQL 用户
mysql> GRANT ALL PRIVILEGES ON remote.* TO remote@"%" IDENTIFIED BY "remotepwd";
第二步是要修改 mysql 的配置文件 /etc/mysql/my.cnf
$> sudo vi /etc/mysql/my.cnf
在旧版本中找到 skip-networking,把它注释掉就可以了
#skip-networking
在新版本中:
# 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
或者把允许访问的 ip 填上
#bind-address = 192.168.1.100
然后重启 MySQL
$> sudo /etc/init.d/mysql restart
* Starting MySQL database server mysqld
...done.
* Checking for corrupt, not cleanly closed and upgrade needing tables.
andy@ubuntu:~$ sudo /etc/init.d/mysql start
* Starting MySQL database server mysqld
...done.
这样就可以远程访问 MySQL 了
然后就开始Mysql的远程访问,以下转自某擦肩而过的博客
要通过远程连接MySQL,需要做两步:
第一步是要创建一个可以远程连接的 MySQL 用户
mysql> GRANT ALL PRIVILEGES ON remote.* TO remote@"%" IDENTIFIED BY "remotepwd";
第二步是要修改 mysql 的配置文件 /etc/mysql/my.cnf
$> sudo vi /etc/mysql/my.cnf
在旧版本中找到 skip-networking,把它注释掉就可以了
#skip-networking
在新版本中:
# 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
或者把允许访问的 ip 填上
#bind-address = 192.168.1.100
然后重启 MySQL
$> sudo /etc/init.d/mysql restart
* Starting MySQL database server mysqld
...done.
* Checking for corrupt, not cleanly closed and upgrade needing tables.
andy@ubuntu:~$ sudo /etc/init.d/mysql start
* Starting MySQL database server mysqld
...done.
这样就可以远程访问 MySQL 了
0 0
- Mysql的远程访问
- Mysql远程访问的开启
- mysql远程访问的问题
- mysql远程访问的设置
- 设置mysql的远程访问
- Mysql远程访问的开启
- mysql远程访问的设置
- mysql 下的远程访问
- 远程访问linux 的mysql
- 远程访问MySql数据库的方法
- 总结mysql不能远程访问的方法
- mysql 用户不能远程访问的
- Mysql的使用方法,包括远程访问
- Mysql远程访问的开启(转载)
- 给你的MySql受远程访问权限
- 远程访问ubuntu上的mysql数据库
- 让MySQL远程用户访问的方法
- MySql不能远程访问的原因,
- 350网店模板一键安装模版与淘宝传统装修的对比
- POJ-2377-Bad Cowtractors
- C++如何把位图保存到数组中
- “玩转”Java系列—Tomcat系统架构分析
- yii filter自定义过滤器类的用法
- Mysql的远程访问
- require.js学习总结
- c++程序中如何用循环数组加载图片
- 程序员的恶性循环 !
- 如何在C语言中scanf格式化输入字符
- 软件项目开发中的百分之九十效应
- 自定义UINavigationBar和按钮
- *Leetcode_construct-binary-tree-from-inorder-and-postorder-traversal
- 【javascript】javascript中的JSON对象