{"id":108,"date":"2008-07-02T05:18:06","date_gmt":"2008-07-02T10:18:06","guid":{"rendered":"http:\/\/installingcats.com\/?p=108"},"modified":"2008-07-02T05:18:06","modified_gmt":"2008-07-02T10:18:06","slug":"cant-connect-to-mysql-server-on-remote-server","status":"publish","type":"post","link":"https:\/\/installingcats.com\/2008\/07\/02\/cant-connect-to-mysql-server-on-remote-server\/","title":{"rendered":"Can’t connect to mysql server on remote server"},"content":{"rendered":"

By default mysql does not allow connects to itself from any host besides localhost, for security reasons.<\/p>\n

When you get an error “Can’t connect to mysql server on [remote server]” when trying to connect to the remote SQL server via the mysql command line tool, log into the server running the mysql server and edit the \/etc\/mysql\/my.cnf config file.<\/p>\n

In particular, comment out the following line:
\nbind-address\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = 127.0.0.1<\/code>
\nThis allows for connections from any host.<\/p>\n

Next, update the mysql user to allow it access from a host other than ‘localhost’<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"

By default mysql does not allow connects to itself from any host besides localhost, for security reasons. When you get an error “Can’t connect to mysql server on [remote server]” when trying to connect to the remote SQL server via the mysql command line tool, log into the server running the mysql server and edit […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,2],"tags":[70,164],"_links":{"self":[{"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/posts\/108"}],"collection":[{"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/comments?post=108"}],"version-history":[{"count":0,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/posts\/108\/revisions"}],"wp:attachment":[{"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/media?parent=108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/categories?post=108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/tags?post=108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}