嵌入式 window下远程访问Linux下mysql问题

来源:互联网 发布:叶罗丽精灵梦娃娃淘宝 编辑:程序博客网 时间:2024/05/29 10:55

在windows下远程访问Linux下mysql数据库解决方法

第一步:vim /etc/mysql/my.conf

                  注释掉”bind-address = 127.0.0.1“

第二步:在命令行底下打开用户权限:

grant all privileges on drupal.* to user@192.168.1.80 identifiedby 'user-password';

(在管理员界面可以通过用户管理add host->anyhost来添加访问权限(root用户默认只能访问本机,新添加的用户可远程)

Example:

grant all privileges on jrm.* to root@10.10.1.103 identified by'0123456789';

然后重新启动mysql服务:sudo /etc/init.d/mysql restart

 

在windows下使用MySQL Workbench 5.2 CE创建新的数据库连接输入对应的密码即可。

原创粉丝点击