{"id":23137,"date":"2017-08-31T02:27:25","date_gmt":"2017-08-31T07:27:25","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=23137"},"modified":"2024-12-09T02:20:26","modified_gmt":"2024-12-09T08:20:26","slug":"how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/","title":{"rendered":"How to configure remote and secure connections for MySQL on Ubuntu 16.04"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p><img decoding=\"async\" class=\"alignnone size-full wp-image-23211\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/08\/How-to-configure-remote-and-secure-connections-for-MySQL-on-Ubuntu-VPS.jpg\" alt=\"\" width=\"1200\" height=\"600\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/08\/How-to-configure-remote-and-secure-connections-for-MySQL-on-Ubuntu-VPS.jpg 1200w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/08\/How-to-configure-remote-and-secure-connections-for-MySQL-on-Ubuntu-VPS-150x75.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/08\/How-to-configure-remote-and-secure-connections-for-MySQL-on-Ubuntu-VPS-300x150.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/08\/How-to-configure-remote-and-secure-connections-for-MySQL-on-Ubuntu-VPS-768x384.jpg 768w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/08\/How-to-configure-remote-and-secure-connections-for-MySQL-on-Ubuntu-VPS-1024x512.jpg 1024w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/08\/How-to-configure-remote-and-secure-connections-for-MySQL-on-Ubuntu-VPS-860x430.jpg 860w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/08\/How-to-configure-remote-and-secure-connections-for-MySQL-on-Ubuntu-VPS-680x340.jpg 680w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/08\/How-to-configure-remote-and-secure-connections-for-MySQL-on-Ubuntu-VPS-500x250.jpg 500w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/08\/How-to-configure-remote-and-secure-connections-for-MySQL-on-Ubuntu-VPS-400x200.jpg 400w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/08\/How-to-configure-remote-and-secure-connections-for-MySQL-on-Ubuntu-VPS-200x100.jpg 200w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/08\/How-to-configure-remote-and-secure-connections-for-MySQL-on-Ubuntu-VPS-50x25.jpg 50w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>In this article, we will show you how to configure remote and secure connections for MySQL on Ubuntu 16.04 VPS.\u00a0 If you are using an unencrypted connection to connect to your remote MariaDB\/MySQL server, then everyone with access to the network could monitor and analyze the data being sent or received between the client and the server. This guide should work on other Linux VPS systems as well but was tested and written for an <a title=\"Ubuntu VPS Hosting\" href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">Ubuntu 16.04 VPS<\/a>.<\/p>\n<p><!--more--><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69df24e9a37c5\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69df24e9a37c5\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/#1-Login-to-your-VPS-via-SSH\" >1. Login to your VPS via SSH<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/#2-Create-a-new-local-certificate-authority\" >2. Create a new local certificate authority<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/#3-Generate-Server-Certificate-and-Key\" >3. Generate Server Certificate and Key<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/#4-Generate-Clients-Certificate-and-Key\" >4. Generate Clients Certificate and Key<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/#5-Enable-MySQL-Server-SSL-Connections\" >5. Enable MySQL Server SSL Connections<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/#6-Enable-Remote-Connections-via-SSL\" >6. Enable Remote Connections via SSL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/#7-Configure-MySQL-Client\" >7. Configure MySQL Client<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/#8-Test-Your-Connection\" >8. Test Your Connection<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"1-Login-to-your-VPS-via-SSH\"><\/span>1. Login to your VPS via SSH<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<pre>ssh my_sudo_user@my_server<\/pre>\n<p>The steps in this tutorial assume that you have installed MySQL 5.7 with the default configuration.<\/p>\n<p><strong>Enable SSL Connections:<\/strong><\/p>\n<h2><span class=\"ez-toc-section\" id=\"2-Create-a-new-local-certificate-authority\"><\/span>2. Create a new local certificate authority<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>We will use the local certificate authority as a self-signed root certificate which we will use to sign both server and client certificates. To create a new local certificate authority file run the following commands:<\/p>\n<pre>sudo openssl genrsa -out \/etc\/mysql\/ca-key.pem 2048\r\nsudo chmod 600 \/etc\/mysql\/ca-key.pem\r\nsudo openssl req -new -key \/etc\/mysql\/ca-key.pem -out \/etc\/mysql\/ca-csr.pem -subj \/CN=mysql-CA\/\r\nsudo openssl x509 -req -in \/etc\/mysql\/ca-csr.pem -out \/etc\/mysql\/cacert.pem -signkey \/etc\/mysql\/ca-key.pem -days 3650\r\nsudo echo 01 &gt; \/etc\/mysql\/cacert.srl\r\n<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"3-Generate-Server-Certificate-and-Key\"><\/span>3. Generate Server Certificate and Key<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To generate a server certificate and key issue the following commands:<\/p>\n<pre>sudo openssl genrsa -out \/etc\/mysql\/server-key.pem 2048\r\nsudo chmod 600 \/etc\/mysql\/server-key.pem\r\nsudo openssl req -new -key \/etc\/mysql\/server-key.pem -out \/etc\/mysql\/server-csr.pem -subj \/CN=mysql\/\r\nsudo openssl x509 -req -in \/etc\/mysql\/server-csr.pem -out \/etc\/mysql\/server-cert.pem -CA \/etc\/mysql\/cacert.pem -CAkey \/etc\/mysql\/ca-key.pem -days 365\r\n<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"4-Generate-Clients-Certificate-and-Key\"><\/span>4. Generate Clients Certificate and Key<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Next, we need to generate the client certificate. Run the following commands to generate a client certificate and key:<\/p>\n<pre>sudo openssl genrsa -out \/etc\/mysql\/client-key.pem 2048\r\nsudo chmod 600 \/etc\/mysql\/client-key.pem\r\nsudo openssl req -new -key \/etc\/mysql\/client-key.pem -out \/etc\/mysql\/client-csr.pem -subj \/CN=mysql\/\r\nsudo openssl x509 -req -in \/etc\/mysql\/client-csr.pem -out \/etc\/mysql\/client-cert.pem -CA \/etc\/mysql\/cacert.pem -CAkey \/etc\/mysql\/ca-key.pem -days 365\r\n<\/pre>\n<p>If you want to have a CA signed SSL certificate, try our <a href=\"https:\/\/www.rosehosting.com\/ssl-certificates.html\" target=\"_blank\" rel=\"noopener noreferrer\">trusted SSL certificate<\/a>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"5-Enable-MySQL-Server-SSL-Connections\"><\/span>5. Enable MySQL Server SSL Connections<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Open the the MySQL configuration file with your text editor:<\/p>\n<pre>sudo nano \/etc\/mysql\/mysql.conf.d\/mysqld.cnf<\/pre>\n<p>and uncomment the following lines:<\/p>\n<pre>ssl-ca=\/etc\/mysql\/cacert.pem\r\nssl-cert=\/etc\/mysql\/server-cert.pem\r\nssl-key=\/etc\/mysql\/server-key.pem\r\n<\/pre>\n<p>Save the file and restart the MySQL service:<\/p>\n<pre>sudo systemctl restart mysql \r\n<\/pre>\n<p>To verify that SSL is enabled, login to the MySQL server<\/p>\n<pre>mysql -uroot -p\r\n<\/pre>\n<p>and run the following command:<\/p>\n<pre>mysql&gt; show variables LIKE '%ssl%';\r\n<\/pre>\n<p>The output should be similar to the following one:<\/p>\n<pre>+---------------+----------------------------+\r\n| Variable_name | Value                      |\r\n+---------------+----------------------------+\r\n| have_openssl  | YES                        |\r\n| have_ssl      | YES                        |\r\n| ssl_ca        | \/etc\/mysql\/cacert.pem      |\r\n| ssl_capath    |                            |\r\n| ssl_cert      | \/etc\/mysql\/server-cert.pem |\r\n| ssl_cipher    |                            |\r\n| ssl_crl       |                            |\r\n| ssl_crlpath   |                            |\r\n| ssl_key       | \/etc\/mysql\/server-key.pem  |\r\n+---------------+----------------------------+\r\n9 rows in set (0.15 sec)\r\n<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"6-Enable-Remote-Connections-via-SSL\"><\/span>6. Enable Remote Connections via SSL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>By default, MySQL only listens for connections on localhost. To enable remote connections you need to reconfigure MySQL on your server to listen on all interfaces, to do that open the MySQL configuration file:<\/p>\n<pre>sudo nano \/etc\/mysql\/mysql.conf.d\/mysqld.cnf<\/pre>\n<p>and change<\/p>\n<pre>bind-address            = 127.0.0.1<\/pre>\n<p>to<\/p>\n<pre>bind-address            = 0.0.0.0<\/pre>\n<p>In order for the changes to take effect, restart the MySQL server with the following command:<\/p>\n<pre>sudo systemctl restart mysql \r\n<\/pre>\n<p>Verify that your MySQL server listens on all interfaces:<\/p>\n<pre>sudo netstat -anp | grep 3306<\/pre>\n<p>the output should be similar to the following one:<\/p>\n<pre>tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      938\/mysqld<\/pre>\n<p>To enable your MySQL client to connect to the MySQL server, you need to grant the database user access to the database on the remote server.<\/p>\n<p>For example if you want to grant access to the <code>dbuser<\/code> user to the <code>database_name<\/code> database and to force SSL, login to the MySQL shell as root and run the following command:<\/p>\n<pre>GRANT ALL ON database_name.* TO dbuser@192.168.1.10 IDENTIFIED BY 'dbuserpassword' REQUIRE SSL;<\/pre>\n<p>where <code>192.168.1.10<\/code> is your MySQL client machine IP address.<\/p>\n<p>Next, you need to configure your MySQL client to use the previously generated SSL certificate. Copy the following files from your MySQL server to your MySQL client machine:<\/p>\n<pre>\/etc\/mysql\/cacert.pem\r\n\/etc\/mysql\/client-cert.pem\r\n\/etc\/mysql\/client-key.pem\r\n<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"7-Configure-MySQL-Client\"><\/span>7. Configure MySQL Client<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>open your MySQL client configuration and add the following lines:<\/p>\n<pre>[client]\r\nssl-ca=\/etc\/mysql\/cacert.pem\r\nssl-cert=\/etc\/mysql\/client-cert.pem\r\nssl-key=\/etc\/mysql\/client-key.pem\r\n<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"8-Test-Your-Connection\"><\/span>8. Test Your Connection<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You can now test your connection from the client machine to the MySQL database server:<\/p>\n<pre>mysql -udbuser -pdbuserpassword -h 192.168.1.5<\/pre>\n<p>where <code>192.168.1.5<\/code> is your MySQL database server IP address.<\/p>\n<hr \/>\n<p>That\u2019s it. You have successfully configured remote and secure connections for MySQL on your Ubuntu 16.04 VPS. For more information about MySQL secure connections, please refer to the <a href=\"https:\/\/dev.mysql.com\/doc\/mysql-secure-deployment-guide\/5.7\/en\/secure-deployment-secure-connections.html\" target=\"_blank\" rel=\"noopener noreferrer\">official MySQL documentation<\/a>.<\/p>\n<hr \/>\n<p>Of course, you don\u2019t have to\u00a0configure remote and secure connections for MySQL on Ubuntu 16.04 if you use one of <a href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting.html\">our Ubuntu VPS Hosting\u00a0Services<\/a>, in which case you can simply ask our expert Linux admins to\u00a0configure remote and secure connections for MySQL on Ubuntu 16.04 for you. They are available 24&#215;7 and will take care of your request immediately.<\/p>\n<p><span style=\"color: #ff0000;\"><strong>PS<\/strong><\/span>. If you liked this post on how to configure remote and secure connections for MySQL on Ubuntu 16.04, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we will show you how to configure remote and secure connections for MySQL on Ubuntu 16.04 VPS.\u00a0 &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to configure remote and secure connections for MySQL on Ubuntu 16.04\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/#more-23137\" aria-label=\"Read more about How to configure remote and secure connections for MySQL on Ubuntu 16.04\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":23211,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1702,1701,1698],"tags":[39,65],"class_list":["post-23137","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-databases","category-networking-and-domains","category-ubuntu","tag-mysql","tag-security","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to configure remote and secure connections for MySQL on Ubuntu 16.04 | RoseHosting<\/title>\n<meta name=\"description\" content=\"How to configure remote and secure connections for MySQL on Ubuntu 16.04 | RoseHosting\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to configure remote and secure connections for MySQL on Ubuntu 16.04\" \/>\n<meta property=\"og:description\" content=\"How to configure remote and secure connections for MySQL on Ubuntu 16.04 | RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2017-08-31T07:27:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-12-09T08:20:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/08\/How-to-configure-remote-and-secure-connections-for-MySQL-on-Ubuntu-VPS.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to configure remote and secure connections for MySQL on Ubuntu 16.04\",\"datePublished\":\"2017-08-31T07:27:25+00:00\",\"dateModified\":\"2024-12-09T08:20:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\\\/\"},\"wordCount\":601,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/How-to-configure-remote-and-secure-connections-for-MySQL-on-Ubuntu-VPS.jpg\",\"keywords\":[\"mysql\",\"security\"],\"articleSection\":[\"Databases\",\"Networking and Domains\",\"Ubuntu\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\\\/\",\"name\":\"How to configure remote and secure connections for MySQL on Ubuntu 16.04 | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/How-to-configure-remote-and-secure-connections-for-MySQL-on-Ubuntu-VPS.jpg\",\"datePublished\":\"2017-08-31T07:27:25+00:00\",\"dateModified\":\"2024-12-09T08:20:26+00:00\",\"description\":\"How to configure remote and secure connections for MySQL on Ubuntu 16.04 | RoseHosting\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/How-to-configure-remote-and-secure-connections-for-MySQL-on-Ubuntu-VPS.jpg\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/08\\\/How-to-configure-remote-and-secure-connections-for-MySQL-on-Ubuntu-VPS.jpg\",\"width\":1200,\"height\":600,\"caption\":\"How to configure remote and secure connections for MySQL on Ubuntu 16.04\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to configure remote and secure connections for MySQL on Ubuntu 16.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to configure remote and secure connections for MySQL on Ubuntu 16.04 | RoseHosting","description":"How to configure remote and secure connections for MySQL on Ubuntu 16.04 | RoseHosting","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/","og_locale":"en_US","og_type":"article","og_title":"How to configure remote and secure connections for MySQL on Ubuntu 16.04","og_description":"How to configure remote and secure connections for MySQL on Ubuntu 16.04 | RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2017-08-31T07:27:25+00:00","article_modified_time":"2024-12-09T08:20:26+00:00","og_image":[{"width":1200,"height":600,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/08\/How-to-configure-remote-and-secure-connections-for-MySQL-on-Ubuntu-VPS.jpg","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to configure remote and secure connections for MySQL on Ubuntu 16.04","datePublished":"2017-08-31T07:27:25+00:00","dateModified":"2024-12-09T08:20:26+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/"},"wordCount":601,"commentCount":2,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/08\/How-to-configure-remote-and-secure-connections-for-MySQL-on-Ubuntu-VPS.jpg","keywords":["mysql","security"],"articleSection":["Databases","Networking and Domains","Ubuntu"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/","name":"How to configure remote and secure connections for MySQL on Ubuntu 16.04 | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/08\/How-to-configure-remote-and-secure-connections-for-MySQL-on-Ubuntu-VPS.jpg","datePublished":"2017-08-31T07:27:25+00:00","dateModified":"2024-12-09T08:20:26+00:00","description":"How to configure remote and secure connections for MySQL on Ubuntu 16.04 | RoseHosting","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/08\/How-to-configure-remote-and-secure-connections-for-MySQL-on-Ubuntu-VPS.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2017\/08\/How-to-configure-remote-and-secure-connections-for-MySQL-on-Ubuntu-VPS.jpg","width":1200,"height":600,"caption":"How to configure remote and secure connections for MySQL on Ubuntu 16.04"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-configure-remote-and-secure-connections-for-mysql-on-ubuntu-16-04-vps\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to configure remote and secure connections for MySQL on Ubuntu 16.04"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/23137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=23137"}],"version-history":[{"count":2,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/23137\/revisions"}],"predecessor-version":[{"id":43926,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/23137\/revisions\/43926"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/23211"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=23137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=23137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=23137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}