{"id":311,"date":"2024-04-18T13:00:05","date_gmt":"2024-04-18T13:00:05","guid":{"rendered":"https:\/\/249host.com\/tutorials\/?p=311"},"modified":"2024-04-18T13:01:23","modified_gmt":"2024-04-18T13:01:23","slug":"setting-up-remote-mysql-database-connection","status":"publish","type":"post","link":"https:\/\/249host.com\/tutorials\/setting-up-remote-mysql-database-connection\/","title":{"rendered":"Setting up a Remote MySQL Database Connection"},"content":{"rendered":"<p>setting up a remote MySQL database connection involves a few key steps. Selecting a reputable web hosting company is only the first step towards building and maintaining a successful website. There may be times when you have to connect to the database from outside your work network and if that\u2019s the case, you need to connect to your database using third-party software that does not run on the server (i.e. a MySQL client on your desktop).<\/p>\n<p>This is referred to as making a remote <a href=\"https:\/\/www.squarebrothers.com\/windows-vps-hosting-india\/\" target=\"_blank\" rel=\"noopener\">MySQL connection<\/a>. To do this, however, you will first have to allow the connection from within cPanel for the IP address you are connecting from. Read on to learn how.<\/p>\n<h2 id=\"program-to-use\" class=\"wp-block-heading\">What program do I use to connect remotely?<\/h2>\n<p>There are a few programs you can use to connect remotely to your database. You can utilize HTML editors like Adobe Dreamweaver for a fee, or there are free Open-Source programs you can use like MySQL Workbench or Heidi SQL. Here are some options to check out.<\/p>\n<ul>\n<li>Navicat for MySQL<\/li>\n<li>MySQL Workbench<\/li>\n<li>Heidi SQL<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-319\" src=\"https:\/\/249host.com\/tutorials\/wp-content\/uploads\/2024\/04\/mysql-300x120.png\" alt=\"\" width=\"455\" height=\"182\" srcset=\"https:\/\/249host.com\/tutorials\/wp-content\/uploads\/2024\/04\/mysql-300x120.png 300w, https:\/\/249host.com\/tutorials\/wp-content\/uploads\/2024\/04\/mysql-768x308.png 768w, https:\/\/249host.com\/tutorials\/wp-content\/uploads\/2024\/04\/mysql.png 879w\" sizes=\"auto, (max-width: 455px) 100vw, 455px\" \/><\/p>\n<h2 id=\"add-ip\" class=\"wp-block-heading\">Adding an IP address to allow a remote MySQL Database connection<\/h2>\n<p>First, you will need to make sure you have the IP address that will be accessing the database. These rules protect the database by only accepting external connections that you have set up. If you are connecting to a database from your current connection, get your IP address by clicking\u00a0<a href=\"https:\/\/www.249host.com\/vps-web-hosting-india\/\">here<\/a>, then follow these steps:<\/p>\n<ol class=\"article_list\">\n<li>Log into cPanel.<\/li>\n<li>Click the\u00a0<strong>Remote MySQL<\/strong>\u00a0button in the\u00a0<em>Databases<\/em>\u00a0section.<\/li>\n<li>Enter the remote IP address in the\u00a0<em>Add Access Host<\/em>\u00a0section.<\/li>\n<li>Click the\u00a0<strong>Add Host<\/strong>\u00a0button.<\/li>\n<\/ol>\n<p>You will then see a message stating the host IP address was added to the access list.<\/p>\n<p>Now, since you have added the IP address to remote MySQL connections you will be able to connect to the databases. You can add as many IP addresses as you need.<\/p>\n<h2 id=\"use-wildcard\" class=\"wp-block-heading\">Using a Wildcard to allow all IP\u2019s<\/h2>\n<p>You may find you need to use a wildcard if your IP address changes regularly. You can add a wildcard by using the\u00a0<strong>% symbol<\/strong>. This will add all IP addresses in that range.<\/p>\n<p>For example, if you want to list all IP addresses in the range 174.77.92.1 to 174.77.92.255 you\u2019d add the IP address 174.77.92.%.<\/p>\n<h2 id=\"troubleshooting\" class=\"wp-block-heading\">Troubleshooting Remote connection issues<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-322\" src=\"https:\/\/249host.com\/tutorials\/wp-content\/uploads\/2024\/04\/ig35bc5osygcrcajpfdrcybea36jc3sachvcdoaizecfr3dnitcq_3_0-300x169.png\" alt=\"\" width=\"466\" height=\"263\" srcset=\"https:\/\/249host.com\/tutorials\/wp-content\/uploads\/2024\/04\/ig35bc5osygcrcajpfdrcybea36jc3sachvcdoaizecfr3dnitcq_3_0-300x169.png 300w, https:\/\/249host.com\/tutorials\/wp-content\/uploads\/2024\/04\/ig35bc5osygcrcajpfdrcybea36jc3sachvcdoaizecfr3dnitcq_3_0.png 700w\" sizes=\"auto, (max-width: 466px) 100vw, 466px\" \/><\/p>\n<div class=\"entry-content\">\n<p>If you are using your preferred remote connection tool and suddenly it will not connect, it\u2019s known as a\u00a0<em>1045 error<\/em>\u00a0and usually reads similar to \u2018<strong>1045 \u2013 access denied for user<\/strong>\u2018. If you are getting this error, here are a couple of things to check:<\/p>\n<h3 class=\"wp-block-heading\">Check your cPanel password<\/h3>\n<p>Many people connect remotely using their\u00a0cPanel username and password\u00a0as opposed to\u00a0creating a single administrative user\u00a0to add to the databases. This is not the preferred method, however, if you do use the cPanel username and you are now getting a connection error, chances are you recently changed the\u00a0cPanel password\u00a0and have not changed it in the Remote connection software settings. Change the password there and you should be able to connect once again.<\/p>\n<h3 class=\"wp-block-heading\">Check to see if connecting IP has changed<\/h3>\n<p>From time to time your ISP (Internet Service Provider) may change your public IP address. If that is the case, you may find yourself unable to connect remotely via your\u00a0preferred software. Check your IP address by clicking\u00a0here.<\/p>\n<p>Once you know your current IP address, go back and make sure that it is in the list of allowed IP addresses for your\u00a0<em>Remote MySQL<\/em>\u00a0settings. If you find it was not in the list, add the new one and then you should then be able to connect remotely.<\/p>\n<p>If you need further assistance with connecting to a database remotely, please contact our support department.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>setting up a remote MySQL database connection involves a few key steps. Selecting a reputable web hosting company is only the first step towards building and maintaining a successful website. There may be times when you have to connect to the database from outside your work network and if that\u2019s the case, you need to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":318,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,1],"tags":[],"class_list":["post-311","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-control-panel","category-linux"],"_links":{"self":[{"href":"https:\/\/249host.com\/tutorials\/wp-json\/wp\/v2\/posts\/311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/249host.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/249host.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/249host.com\/tutorials\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/249host.com\/tutorials\/wp-json\/wp\/v2\/comments?post=311"}],"version-history":[{"count":9,"href":"https:\/\/249host.com\/tutorials\/wp-json\/wp\/v2\/posts\/311\/revisions"}],"predecessor-version":[{"id":323,"href":"https:\/\/249host.com\/tutorials\/wp-json\/wp\/v2\/posts\/311\/revisions\/323"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/249host.com\/tutorials\/wp-json\/wp\/v2\/media\/318"}],"wp:attachment":[{"href":"https:\/\/249host.com\/tutorials\/wp-json\/wp\/v2\/media?parent=311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/249host.com\/tutorials\/wp-json\/wp\/v2\/categories?post=311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/249host.com\/tutorials\/wp-json\/wp\/v2\/tags?post=311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}