MySQL TCP Connection

2019-08-05 11:39发布

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?

1条回答
Root(大扎)
2楼-- · 2019-08-05 12:15

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 TO "myuser"@"myotherhost" IDENTIFIED BY "somepassword";

查看更多
登录 后发表回答