{"id":273,"date":"2017-01-07T13:14:23","date_gmt":"2017-01-07T13:14:23","guid":{"rendered":"https:\/\/jsmwebsolutions.com\/blog\/?p=273"},"modified":"2017-03-17T17:56:19","modified_gmt":"2017-03-17T17:56:19","slug":"access-mysql-database-remotely-siteground","status":"publish","type":"post","link":"https:\/\/jsmwebsolutions.com\/blog\/access-mysql-database-remotely-siteground\/","title":{"rendered":"How to Access Your MySQL Database Remotely in SiteGround"},"content":{"rendered":"<p>\n\t<strong>How to Access Your MySQL Database Remotely in SiteGround<\/strong>\n<\/p>\n<p>\n\t<strong>MySQL<\/strong> is nothing but a freely available open source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). &nbsp;It was launched on 23 May 1995 almost 21 years ago and in 2013 it was the world&#39;s second most&nbsp;widely used RDBMS, and the most widely used open-source&nbsp;client&ndash;server model&nbsp;RDBMS.\n<\/p>\n<p>\n\tSQL is the most popular language for adding, accessing and managing content in a database. It is most noted for its quick processing, proven reliability, ease and flexibility of use. MySQL is an essential part of almost every open source PHP application. Good examples for PHP\/MySQL-based scripts are PHP and Joomla. But by default, <strong>MySQL database server remote access<\/strong> is usually disabled for security reasons. However, sometimes you need to provide the remote access to database server from home or from the web server.\n<\/p>\n<p>\n\tWhen MySQL is enabled for remote access, it has negative impacts on the server and its users, for example:\n<\/p>\n<ul>\n<li>\n\t\tExternal brute force attacks.\n\t<\/li>\n<li>\n\t\tSome customers might use the server as their main database server and point multiple external sites to the server.\n\t<\/li>\n<li>\n\t\tIf your database users were somehow compromised, external attackers will be able to access your database.\n\t<\/li>\n<\/ul>\n<p>\n\tMust Read:<a href=\"http:\/\/www.amazecraze.com\/find-out-how-to-write-a-web-blog\/\" title=\"Find Out How To Start A Successful Blog \u2013 AC\" target=\"_blank\" rel=\"noopener\">How To Start A Successful Blog<\/a>\n<\/p>\n<p>\n\tThis post will explain how to safely setup a user account and access a MySQL Database Remotely in SiteGround.\n<\/p>\n<p>\n\tLet us now focus on the source of problems that might be causing from accessing your MySQL Database remotely in SiteGround. If you have problems accessing your database at your&nbsp;web hosting&nbsp;account remotely please make sure of the following:\n<\/p>\n<ul>\n<li>\n\t\tMake sure that you are using the correct MySQL hostname &ndash; it should be yourdomain.com or your server&#39;s name;\n\t<\/li>\n<li>\n\t\tSecondly, you are using the correct MySQL database \/ username \/ password.\n\t<\/li>\n<li>\n\t\tYou can actually go through SiteGround Tutorials to get more information on how to create them.\n\t<\/li>\n<li>\n\t\tYou should not forget to specify your MySQL username and database with the prefix<em>yourusername_<\/em>&nbsp;in front of its given name.\n\t<\/li>\n<li>\n\t\tFor example, your cPanel username is<em>user<\/em>&nbsp;and you have named your database&nbsp;<em>Joomla<\/em>. In this case, make sure to refer to your database as&nbsp;<em>user_joomla<\/em><em>.<\/em>\n\t<\/li>\n<li>\n\t\tYou have allowed the remote host to access your database. This can be done from your<strong>cPanel &gt; Remote MySQL<\/strong><strong>.<\/strong>\n\t<\/li>\n<li>\n\t\tAnother thing to keep in mind is that you are connecting to the TCP port 3306.\n\t<\/li>\n<\/ul>\n<p>\n\tA common mistake that people make today is trying to access the database using the main cPanel login. This is something that we often tend to ignore and leads to issues when we try to access the database. For those of you who do this, it must be noted that this will not work and you will have to use the MySQL user instead.\n<\/p>\n<p>\n\tIt is a common problem that people face today. If you are having problems accessing your MySQL databases remotely, ask your SiteGround for assistance. SiteGround provides&nbsp;the best MySQL Hosting&nbsp;and assists you with any MySQL issues you may have.\n<\/p>\n<p>\n\tIn SiteGround, you can allow access to MySQL databases from an external location by adding its domain name or IP address to the list of hosts that are allowed to access your databases remotely. Additionally, if you would like to manage your database using an application for remote database management, the IP address from which the connection is established should be added to the list of allowed hosts. SiteGround&nbsp;MySQL hosting&nbsp;allows remote database access with the following items assumed.\n<\/p>\n<p>\n\t<strong><u>Configuration Settings<\/u>:<\/strong>\n<\/p>\n<p>\n\tUse the following configuration settings for connecting to your database:\n<\/p>\n<ul>\n<li>\n\t\tHost name&nbsp;= (use the server IP address)\n\t<\/li>\n<li>\n\t\tDatabase name&nbsp;= (cpanelUsername_databaseName)\n\t<\/li>\n<li>\n\t\tDatabase username&nbsp;= (cpanelUsername_databaseUsername)\n\t<\/li>\n<li>\n\t\tDatabase password&nbsp;= (the password you entered for that database user)\n\t<\/li>\n<li>\n\t\tMySQL Connection Port&nbsp;= 3306\n\t<\/li>\n<li>\n\t\tTCP&nbsp;or&nbsp;UDP either is fine.\n\t<\/li>\n<\/ul>\n<p>\n\t<strong><u>Getting your IP address:<\/u><\/strong>\n<\/p>\n<p>\n\tYou will need to know what the IP address you are connecting from. To find this you can contact your host or even check it online on various sites.\n<\/p>\n<p>\n\t<strong><u>Granting access:<\/u><\/strong>\n<\/p>\n<p>\n\tGranting access to a user from a remote host is fairly simple and can be accomplished by just a few steps.\n<\/p>\n<ul>\n<li>\n\t\tFirst, you will need to login locally to your MySQL server as the<em>root<\/em><em>&nbsp;<\/em>\n\t<\/li>\n<li>\n\t\tThis will prompt you for your MySQL root password.\n\t<\/li>\n<li>\n\t\tOnce you are logged into MySQL you need to issue the GRANT command that will enable access for your remote user.\n\t<\/li>\n<li>\n\t\tYou will also need to change <strong>my_password<\/strong>&nbsp;with the password that you would like to use for&nbsp;<strong>future uses.<\/strong>\n\t<\/li>\n<li>\n<figure id=\"attachment_275\" aria-describedby=\"caption-attachment-275\" style=\"width: 300px\" class=\"wp-caption alignnone\"><img decoding=\"async\" alt=\"MySQL Database Remotely\" class=\"size-medium wp-image-275 wp-caption alignnone\" height=\"162\" src=\"https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/01\/MySQL-Database-Remotely-300x162.png\" width=\"300\" srcset=\"https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/01\/MySQL-Database-Remotely-300x162.png 300w, https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/01\/MySQL-Database-Remotely.png 564w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><figcaption id=\"caption-attachment-275\" class=\"wp-caption-text\">MySQL Database Remotely<\/figcaption><\/figure>\n<\/li>\n<\/ul>\n<p>\n\t<strong>&nbsp;<\/strong>\n<\/p>\n<p>\n\t<strong><u>Enable Your Computer as an Access Host:<\/u><\/strong>\n<\/p>\n<p>\n\tBy default, all IPs are blocked for any user. This IPs must be added to an access list in order to access the server. So, you must always keep in mind that before connecting to MySQL from another computer, the connecting computer must be enabled as an&nbsp;Access Host. In order to add allowed hosts, you should access the tool via cPanel -&gt; Remote MySQL.\n<\/p>\n<p>\n\tNow comes the Host Field, in the Host field you should enter the desired domain name or IP address. Then Click on the Add host button. A confirmation message will inform that the host is successfully added. Next time you access Remote MySQL the newly added host will be listed under Access Hosts.\n<\/p>\n<p>\n\t<a href=\"https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/01\/add-host.png\"><img decoding=\"async\" alt=\"\" class=\"alignnone size-medium wp-image-276\" height=\"162\" src=\"https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/01\/add-host-300x162.png\" width=\"300\" srcset=\"https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/01\/add-host-300x162.png 300w, https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/01\/add-host.png 564w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\n<\/p>\n<p>\n\t<strong>The above-mentioned steps work for all the plans under SiteGround Hosting except for the GoGeek plan. Since GoGeek plan works for more business oriented stuff, the level of security is pretty high on it. Therefore, it is important to know how to access MySQL remotely <\/strong><em>only for accounts hosted on<\/em><em>&nbsp;<\/em><em>GoGeek servers. <\/em>&nbsp;In order to complete the PCI compliance requirements, the remote MySQL connection to the GoGeek servers&#39; primary IP is blocked. Still, to establish a remote MySQL connection to a database hosted on a GoGeek server use the server&#39;s secondary IP. This additional IP will be listed in the corresponding&nbsp;<strong>Remote MySQL<\/strong>&nbsp;page. Alternatively, you can find it in the&nbsp;<strong>Customer Area.<\/strong>\n<\/p>\n<p>\n\t<strong>When you log into your Customer Area, switch to the My Account section. Once you are in the My Account you can go the Manage option and get the steps for My SQL remote access. <\/strong>\n<\/p>\n<p>\n\t<strong>Well, this pretty much sums up the post on how to remotely access MySQL Database on SiteGround. It is quite simple if you follow the steps mentioned here. Yet if you still face further issues, you can always contact the 24&#215;7 SiteGround Customer support for help.<\/strong>\n<\/p>\n<p>\n\tMeta Description: Check How to Access MySQL Database remotely in SiteGround and manage your MySQL easily.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Access Your MySQL Database Remotely in SiteGround MySQL is nothing but a freely available open source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). &nbsp;It&hellip;<\/p>\n","protected":false},"author":1,"featured_media":275,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[36,95],"tags":[21,34],"class_list":["post-273","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-featured","category-technology","tag-featured","tag-mysql-database-remotely"],"rttpg_featured_image_url":{"full":["https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/01\/MySQL-Database-Remotely.png",564,304,false],"landscape":["https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/01\/MySQL-Database-Remotely.png",564,304,false],"portraits":["https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/01\/MySQL-Database-Remotely.png",564,304,false],"thumbnail":["https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/01\/MySQL-Database-Remotely-150x150.png",150,150,true],"medium":["https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/01\/MySQL-Database-Remotely-300x162.png",300,162,true],"large":["https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/01\/MySQL-Database-Remotely.png",564,304,false],"1536x1536":["https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/01\/MySQL-Database-Remotely.png",564,304,false],"2048x2048":["https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/01\/MySQL-Database-Remotely.png",564,304,false]},"rttpg_author":{"display_name":"Aj","author_link":"https:\/\/jsmwebsolutions.com\/blog\/author\/admin\/"},"rttpg_comment":0,"rttpg_category":"<a href=\"https:\/\/jsmwebsolutions.com\/blog\/category\/featured\/\" rel=\"category tag\">Featured<\/a> <a href=\"https:\/\/jsmwebsolutions.com\/blog\/category\/technology\/\" rel=\"category tag\">Technology<\/a>","rttpg_excerpt":"How to Access Your MySQL Database Remotely in SiteGround MySQL is nothing but a freely available open source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). &nbsp;It&hellip;","_links":{"self":[{"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/273","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=273"}],"version-history":[{"count":4,"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/273\/revisions"}],"predecessor-version":[{"id":420,"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/273\/revisions\/420"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/media\/275"}],"wp:attachment":[{"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=273"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}