MySQL TCP Connection

时光毁灭记忆、已成空白 提交于 2019-12-11 05:59:56

问题


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:


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";



来源:https://stackoverflow.com/questions/5381953/mysql-tcp-connection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!