{"id":579,"date":"2021-02-28T18:08:30","date_gmt":"2021-02-28T18:08:30","guid":{"rendered":"http:\/\/kevinmichaelcoy.com\/blog\/?p=579"},"modified":"2021-02-28T18:10:45","modified_gmt":"2021-02-28T18:10:45","slug":"remote-connecting-to-cpanel-mysql-database-via-dailyrazor","status":"publish","type":"post","link":"http:\/\/kevinmichaelcoy.com\/blog\/2021\/02\/28\/remote-connecting-to-cpanel-mysql-database-via-dailyrazor\/","title":{"rendered":"Remote Connecting to CPanel MySQL Database via DailyRazor"},"content":{"rendered":"\n<p>Many website hosting services provide a tool to manage your websites via <a href=\"https:\/\/en.wikipedia.org\/wiki\/CPanel\">CPanel<\/a>. Normally, your website hosting company will also provide cheap or free database hosting for MySQL. One such example is the award-winning hosting company DailyRazor. <\/p>\n\n\n\n<h2>Create MySQL Database via CPanel<\/h2>\n\n\n\n<p>CPanel makes it very easy to create a new MySQL database by just going to the &#8220;Databases&#8221; section.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1677\" height=\"415\" src=\"http:\/\/kevinmichaelcoy.com\/blog\/wp-content\/uploads\/2021\/02\/image-4.png\" alt=\"Creating a MySQL Database via CPanel\" class=\"wp-image-580\"\/><\/figure>\n\n\n\n<h2>Create User for MySQL Database via CPanel<\/h2>\n\n\n\n<p>Add a new user like so:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1020\" height=\"518\" src=\"http:\/\/kevinmichaelcoy.com\/blog\/wp-content\/uploads\/2021\/02\/image-5.png\" alt=\"Creating a user for a MySQL database via CPanel\n\" class=\"wp-image-581\"\/><\/figure>\n\n\n\n<p>Add that new user to your new database:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1120\" height=\"575\" src=\"http:\/\/kevinmichaelcoy.com\/blog\/wp-content\/uploads\/2021\/02\/image-6.png\" alt=\"Adding a user to the MySQL Database via CPanel\n\" class=\"wp-image-582\"\/><\/figure>\n\n\n\n<h2>Manage User Privileges for MySQL User via CPanel<\/h2>\n\n\n\n<p>Once you add a user to a database, you will be redirected to a new page in CPanel to establish and manage that users privileges.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1111\" height=\"881\" src=\"http:\/\/kevinmichaelcoy.com\/blog\/wp-content\/uploads\/2021\/02\/image-7.png\" alt=\"Adding MySQL privileges for a user via CPanel\n\" class=\"wp-image-583\"\/><\/figure>\n\n\n\n<h2>Allowing a Remote Connection to Your New MySQL Database via CPanel<\/h2>\n\n\n\n<p>Now, you can allow remote connections your MySQL Database via CPanel by first going to that section of CPanel<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1262\" height=\"553\" src=\"http:\/\/kevinmichaelcoy.com\/blog\/wp-content\/uploads\/2021\/02\/image-8.png\" alt=\"Remote MySQL icon in CPanel\n\" class=\"wp-image-584\"\/><\/figure>\n\n\n\n<p>Once you click &#8220;Remote MySQL&#8221;, you are taken to a page where you should enter the IP address you want to allow access:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"866\" height=\"454\" src=\"http:\/\/kevinmichaelcoy.com\/blog\/wp-content\/uploads\/2021\/02\/image-9.png\" alt=\"Remote IP or Hostname to\n MySQL Database \" class=\"wp-image-585\"\/><\/figure>\n\n\n\n<p>You can look up your remote IP address by going to sites like https:\/\/www.whatsmyip.org\/ or you can find your external IP from the command line with <code>curl ifconfig.me<\/code><\/p>\n\n\n\n<h2>Test Remote Connection to MySQL Database via TablePlus<\/h2>\n\n\n\n<p>Now, you can use your favorite database client. If you do work with multiple databases, I would highly recommend using <a href=\"https:\/\/www.tableplus.io\/download\">TablePlus<\/a>. First select &#8220;Create a new connection&#8230;&#8221;. Then, enter in your website&#8217;s hostname, the standard MySQL database port 3306, your new username and password, and your database&#8217;s name. Then, press &#8220;Test&#8221; and if you see the fields turn &#8220;green&#8221; you are good to go.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"946\" height=\"801\" src=\"http:\/\/kevinmichaelcoy.com\/blog\/wp-content\/uploads\/2021\/02\/image-10.png\" alt=\"TablePlus 3.12.4 Test Remote MySQL Database Connection\n\" class=\"wp-image-586\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Many website hosting services provide a tool to manage your websites via CPanel. Normally, your website hosting company will also provide cheap or free database hosting for MySQL. One such example is the award-winning hosting company DailyRazor. Create MySQL Database via CPanel CPanel makes it very easy to create a&#8230;<\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"http:\/\/kevinmichaelcoy.com\/blog\/2021\/02\/28\/remote-connecting-to-cpanel-mysql-database-via-dailyrazor\/\">Continue reading<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":2,"featured_media":585,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[399,403,407,404,405,400,401],"_links":{"self":[{"href":"http:\/\/kevinmichaelcoy.com\/blog\/wp-json\/wp\/v2\/posts\/579"}],"collection":[{"href":"http:\/\/kevinmichaelcoy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/kevinmichaelcoy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/kevinmichaelcoy.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/kevinmichaelcoy.com\/blog\/wp-json\/wp\/v2\/comments?post=579"}],"version-history":[{"count":1,"href":"http:\/\/kevinmichaelcoy.com\/blog\/wp-json\/wp\/v2\/posts\/579\/revisions"}],"predecessor-version":[{"id":587,"href":"http:\/\/kevinmichaelcoy.com\/blog\/wp-json\/wp\/v2\/posts\/579\/revisions\/587"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/kevinmichaelcoy.com\/blog\/wp-json\/wp\/v2\/media\/585"}],"wp:attachment":[{"href":"http:\/\/kevinmichaelcoy.com\/blog\/wp-json\/wp\/v2\/media?parent=579"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/kevinmichaelcoy.com\/blog\/wp-json\/wp\/v2\/categories?post=579"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/kevinmichaelcoy.com\/blog\/wp-json\/wp\/v2\/tags?post=579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}