MySQL TCP连接 [英] MySQL TCP Connection

查看:209
本文介绍了MySQL TCP连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个MySQL数据库,我想从不同的计算机连接到,最好使用TCP / IP。什么是最简单的方法来做到这一点。目前我已经试过只是把计算机的IP地址,它出来的错误#1130,这是没有帮助。

I have a MySQL Database which I want to connect to from a different computer, preferably using TCP/IP. What is the easiest way to do this. Currently I have tried just putting the IP address of the computer in, and it comes up with Error #1130, which is no help.

任何好的简单的方法来做这个?

Any nice easy ways to do this?

推荐答案

确保skip-networking不在您的my.cnf文件),并且您已创建了一个具有远程主机连接权限的用户。类似的东西:

Make sure "skip-networking" is not in your my.cnf file (restart MySQL if it is after changing it), and that you've created a user with permissions to connection from your remote host. Something like:

GRANT SELECT,INSERT,UPDATE,DELETE ON mydb.mytable TOmyuser@myotherhostIDENTIFIED BYsomepassword;

GRANT SELECT,INSERT,UPDATE,DELETE ON mydb.mytable TO "myuser"@"myotherhost" IDENTIFIED BY "somepassword";

这篇关于MySQL TCP连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆