{"id":1420,"date":"2014-12-16T23:31:19","date_gmt":"2014-12-16T23:31:19","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=1420"},"modified":"2014-12-16T23:31:19","modified_gmt":"2014-12-16T23:31:19","slug":"mysql-remote-access-plesk","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2014\/12\/16\/mysql-remote-access-plesk\/","title":{"rendered":"Mysql Remote access on plesk"},"content":{"rendered":"<p>edit \/etc\/my.cnf to show the following&#8230;<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;mysqld]\nport = 3306\n# bind-address = 10.10.0.1\n# skip-networking\n....\n\n<\/pre>\n<p>Where,<\/p>\n<p>* bind-address : local IP address to bind to. If you wish mysql listen on all IPs, don&#8217;t use this option.<\/p>\n<p>* skip-networking : Don&#8217;t listen for TCP\/IP connections at all. All interaction with mysqld must be made via Unix sockets. This option is highly recommended for systems where only local requests are allowed. Since you need to allow remote connection this line should be removed from file or put it in comment state.<\/p>\n<p>Restart MySQL. <\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# service mysqld restart\n\n<\/pre>\n<p>Now you should grant access to remote IP address, login to Mysql:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# mysql -uadmin -p`cat \/etc\/psa\/.psa.shadow` mysql\n\n<\/pre>\n<p>For example if you want to allow access to database called &#8216;foo&#8217; for user &#8216;bar&#8217; and remote IP 192.168.0.1(The IP you are connecting from) then you need to type following commands at &#8220;mysql&#8221; prompt:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nmysql&gt; GRANT ALL ON foo.* TO bar@&#039;192.168.0.1&#039; IDENTIFIED BY &#039;PASSWORD&#039;;\n\n<\/pre>\n<p>If you want to grant remote access for all databases to any IP:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\nmysql&gt; GRANT ALL PRIVILEGES ON *.* TO &#039;USERNAME&#039;@&#039;%&#039; IDENTIFIED BY &#039;PASSWORD&#039; WITH GRANT OPTION;\n\n<\/pre>\n<p>Be sure to check that Iptables is set up with the info to allow the remote connection<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\"># iptables -A INPUT -i eth0 -p tcp -m tcp --dport 3306 -j ACCEPT\n<\/pre>\n<p>To add to an existing database: <\/p>\n<p>Other sources:<br \/>\n<a href=\"http:\/\/www.cyberciti.biz\/tips\/how-do-i-enable-remote-access-to-mysql-database-server.html\" target=\"_blank\" rel=\"noopener\">http:\/\/www.cyberciti.biz\/tips\/how-do-i-enable-remote-access-to-mysql-database-server.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>edit \/etc\/my.cnf to show the following&#8230; &#x5B;mysqld] port = 3306 # bind-address = 10.10.0.1 # skip-networking &#8230;. Where, * bind-address : local IP address to bind to. If you wish mysql listen on all IPs, don&#8217;t use this option. * skip-networking : Don&#8217;t listen for TCP\/IP connections at all. All interaction with mysqld must be &#8230; <a title=\"Mysql Remote access on plesk\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2014\/12\/16\/mysql-remote-access-plesk\/\" aria-label=\"Read more about Mysql Remote access on plesk\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[70,86],"tags":[],"class_list":["post-1420","post","type-post","status-publish","format-standard","hentry","category-mysql","category-plesk"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/1420","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=1420"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/1420\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=1420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=1420"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=1420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}