{"id":8545,"date":"2020-10-28T04:59:00","date_gmt":"2020-10-28T04:59:00","guid":{"rendered":"https:\/\/ubiq.co\/tech-blog\/?p=8545"},"modified":"2025-08-25T04:31:29","modified_gmt":"2025-08-25T04:31:29","slug":"how-to-enable-ssl-tls-for-mysql-in-ubuntu","status":"publish","type":"post","link":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/","title":{"rendered":"How to Enable SSL\/TLS for MySQL in Ubuntu"},"content":{"rendered":"\n<p>MySQL allows users to securely connect to databases using SSL\/TLS certificates. In this article we will look at MySQL SSL Configuration &#8211; how to enable SSL\/TLS for MySQL in Ubuntu.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><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><\/span><\/a><\/span><\/div>\n<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:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/#How_to_Enable_SSLTLS_for_MySQL\" >How to Enable SSL\/TLS for MySQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/#1_Install_MySQL\" >1. Install MySQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/#2_Check_SSL_Status\" >2. Check SSL Status<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/#3_Generate_SSLTLS_certificates\" >3. Generate SSL\/TLS certificates<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/#4_Enable_SSL_Connections_in_MySQL_Server\" >4. Enable SSL Connections in MySQL Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/#5_Verify_SSL_connection\" >5. Verify SSL connection<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/#6_Configure_SSL_for_remote_connection_Optional\" >6. Configure SSL for remote connection (Optional)<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Enable_SSLTLS_for_MySQL\"><\/span>How to Enable SSL\/TLS for MySQL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Here are the steps to Setup SSL connections in MySQL.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Install_MySQL\"><\/span>1. Install MySQL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Open terminal and run the following commands to install MySQL.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo apt-get update\n$ sudo apt-get install mysql-client<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Check_SSL_Status\"><\/span>2. Check SSL Status<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Log into MySQL as root<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ mysql -uroot -p<\/pre>\n\n\n\n<p>You will be prompted for root password. After logging in, enter the following command to find present SSL\/TLS status<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; SHOW VARIABLES LIKE '%ssl%';\n+---------------+----------+\n| Variable_name | Value    |\n+---------------+----------+\n| have_openssl  | DISABLED |\n| have_ssl      | DISABLED |\n| ssl_ca        |          |\n| ssl_capath    |          |\n| ssl_cert      |          |\n| ssl_cipher    |          |\n| ssl_crl       |          |\n| ssl_crlpath   |          |\n| ssl_key       |          |\n+---------------+----------+\n<\/pre>\n\n\n\n<p>You will find that <em>have_openssl<\/em> and <em>have_ssl<\/em> both have DISABLED value. It means that SSL is not enabled in MySQL.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Generate_SSLTLS_certificates\"><\/span>3. Generate SSL\/TLS certificates<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Next, we need to generate SSL\/TLS certificates and point MySQL server to their locations. Typically, people use <a href=\"https:\/\/www.openssl.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">openssl<\/a> to generate SSL certificates and then move them to \/var\/lib\/mysql which is the default location of SSL files for MySQL server.<\/p>\n\n\n\n<p>However, MySQL 5.7 and later versions already ship with a utility mysql_ssl_rsa_setup to simplify this process. It generates SSL certificates and stores them at \/var\/lib\/mysql.<\/p>\n\n\n\n<p>Since we need mysql process to be able to read these files, we will make <em>mysql<\/em> as the owner of these files, as shown below.<\/p>\n\n\n\n<p>Run the following command to generate SSL certificates<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo mysql_ssl_rsa_setup --uid=mysql\n\n<code>Generating a 2048 bit RSA private key ...................................+++ .....+++ <\/code>\n<code>writing new private key to 'ca-key.pem' <\/code>\n<code>----- <\/code>\n<code>Generating a 2048 bit RSA private key ......+++ .................................+++ <\/code>\n<code>writing new private key to 'server-key.pem' <\/code>\n<code>----- <\/code>\n<code>Generating a 2048 bit RSA private key ......................................................+++ .................................................................................+++ <\/code>\n<code>writing new private key to 'client-key.pem' <\/code>\n<code>-----<\/code><\/pre>\n\n\n\n<p>You can check the generated files by running the following command<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ ls -all \/var\/lib\/mysql\/*.pem<\/pre>\n\n\n\n<p>You will see something like the following<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">256740      4 -rw-r--r--   1 mysql    mysql        1078 May 1 12:24 \/var\/lib\/mysql\/server-cert.pem\n   256735      4 -rw-------   1 mysql    mysql        1675 May 1 12:24 \/var\/lib\/mysqlsql\/ca-key.pem\n   256739      4 -rw-r--r--   1 mysql    mysql         451 May 1 12:24 \/var\/lib\/mysqlsql\/public_key.pem\n   256741      4 -rw-------   1 mysql    mysql        1689 May 1 12:24 \/var\/lib\/mysqlsql\/client-key.pem\n   256737      4 -rw-r--r--   1 mysql    mysql        1064 May 1 12:24 \/var\/lib\/mysqlsql\/ca.pem\n   256743      4 -rw-r--r--   1 mysql    mysql        1048 May 1 12:24 \/var\/lib\/mysqlsql\/client-cert.pem\n   256736      4 -rw-------   1 mysql    mysql        1625 May 1 12:24 \/var\/lib\/mysqlsql\/private_key.pem\n   256738      4 -rw-------   1 mysql    mysql        1615 May 1 12:24 \/var\/lib\/mysqlsql\/server-key.pem<\/pre>\n\n\n\n<p>These are the SSL certificate file and private key pairs for certificate authority, MySQL Server and MySQL client.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_Enable_SSL_Connections_in_MySQL_Server\"><\/span>4. Enable SSL Connections in MySQL Server<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Next, restart MySQL Server to enable SSL\/TLS in MySQL.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo systemctl restart mysql <\/pre>\n\n\n\n<p>MySQL Server will automatically look for SSL certificate files in \/var\/lib\/mysql when it starts. So you do not have to manually specify their location in MySQL configuration file.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"5_Verify_SSL_connection\"><\/span>5. Verify SSL connection<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Log into MySQL as before (step 2) and run the following command.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">SHOW VARIABLES LIKE '%ssl%';\nOutput\n+---------------+-----------------+\n| Variable_name | Value           |\n+---------------+-----------------+\n| have_openssl  | YES             |\n| have_ssl      | YES             |\n| ssl_ca        | ca.pem          |\n| ssl_capath    |                 |\n| ssl_cert      | server-cert.pem |\n| ssl_cipher    |                 |\n| ssl_crl       |                 |\n| ssl_crlpath   |                 |\n| ssl_key       | server-key.pem  |\n+---------------+-----------------+<\/pre>\n\n\n\n<p>Now you will find <em>have_openssl<\/em> and <em>have_ssl<\/em> variables are YES. You will also see that <em>ssl_ca<\/em>, <em>ssl_cert<\/em> and <em>ssl_key<\/em> are populated with appropriate values.<\/p>\n\n\n\n<p>You can also check your connection details.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; <code>\\s<\/code>\n<code>\n-------------- <\/code>\n<code>. . . <\/code>\n<code>SSL: Cipher in use is DHE-RSA-AES256-SHA <\/code>\n<code>. . . <\/code>\n<code>Connection: 127.0.0.1 via TCP\/IP <\/code>\n<code>. . . <\/code>\n<code>--------------<\/code><\/pre>\n\n\n\n<p><br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"6_Configure_SSL_for_remote_connection_Optional\"><\/span>6. Configure SSL for remote connection (Optional)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>If your MySQL server has remote incoming connections, then you can enable SSL for remote connection, and even make it mandatory by modifying the MySQL server configuration file.<\/p>\n\n\n\n<p>Open terminal and run the following command to open MySQL configuration.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo vi \/etc\/mysql\/my.cnf<\/pre>\n\n\n\n<p>Add [mysqld] block of code as shown, below the two !includedir statements.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>!includedir \/etc\/mysql\/conf.d\/ <\/code>\n<code>!includedir \/etc\/mysql\/mysql.conf.d\/ <\/code>\n\n<code>[mysqld] <\/code>\n<code># Require clients to connect either using SSL <\/code>\n<code># or through a local socket file <\/code>\n<code>require_secure_transport = ON<\/code>\n<code>bind-address = 0.0.0.0<\/code><\/pre>\n\n\n\n<p>In the last line, we have set bind-address to 0.0.0.0 to allow remote connections. You need not add it if you have already enabled remote connections.<\/p>\n\n\n\n<p>Restart MySQL Server to apply changes. From now on, MySQL will require SSL.<\/p>\n\n\n\n<p>For remote connections, please don&#8217;t forget to open port 443, instead of the default 3306. This is because SSL connections happen over port 443, and not 3306.<\/p>\n\n\n\n<p>Hopefully, this article will help you enable SSL\/TLS connection in MySQL.<\/p>\n\n\n\n<p>Also read:<br><a href=\"https:\/\/ubiq.co\/tech-blog\/copy-table-mysql\/\">How to Copy Table in MySQL<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-duplicate-table-in-mysql\/\">How to Duplicate Table in MySQL<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-get-cumulative-total-users-per-day-in-mysql\/\">How to Get Cumulative Total Users Per Day in MySQL<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>MySQL allows SSL\/TLS connections with SSL certificate. Here is how to enable SSL\/TLS for MySQL for Ubuntu.<\/p>\n","protected":false},"author":1,"featured_media":8546,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[324],"tags":[487,80,485],"class_list":["post-8545","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mysql","tag-secure-connection","tag-ssl","tag-tls"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Enable SSL\/TLS for MySQL in Ubuntu - Ubiq BI<\/title>\n<meta name=\"description\" content=\"MySQL allows SSL\/TLS connections with SSL certificate. Here is how to enable SSL\/TLS for MySQL for Ubuntu.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Enable SSL\/TLS for MySQL in Ubuntu - Ubiq BI\" \/>\n<meta property=\"og:description\" content=\"MySQL allows SSL\/TLS connections with SSL certificate. Here is how to enable SSL\/TLS for MySQL for Ubuntu.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/\" \/>\n<meta property=\"og:site_name\" content=\"Ubiq BI\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ubiqbi\" \/>\n<meta property=\"article:published_time\" content=\"2020-10-28T04:59:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-25T04:31:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/enable-ssl-connection-mysql.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"730\" \/>\n\t<meta property=\"og:image:height\" content=\"410\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Sreeram Sreenivasan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:site\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sreeram Sreenivasan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/\"},\"author\":{\"name\":\"Sreeram Sreenivasan\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc\"},\"headline\":\"How to Enable SSL\/TLS for MySQL in Ubuntu\",\"datePublished\":\"2020-10-28T04:59:00+00:00\",\"dateModified\":\"2025-08-25T04:31:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/\"},\"wordCount\":514,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/enable-ssl-connection-mysql.webp?fit=730%2C410&ssl=1\",\"keywords\":[\"secure connection\",\"ssl\",\"tls\"],\"articleSection\":[\"MySQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/\",\"url\":\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/\",\"name\":\"How to Enable SSL\/TLS for MySQL in Ubuntu - Ubiq BI\",\"isPartOf\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/enable-ssl-connection-mysql.webp?fit=730%2C410&ssl=1\",\"datePublished\":\"2020-10-28T04:59:00+00:00\",\"dateModified\":\"2025-08-25T04:31:29+00:00\",\"author\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc\"},\"description\":\"MySQL allows SSL\/TLS connections with SSL certificate. Here is how to enable SSL\/TLS for MySQL for Ubuntu.\",\"breadcrumb\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/enable-ssl-connection-mysql.webp?fit=730%2C410&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/enable-ssl-connection-mysql.webp?fit=730%2C410&ssl=1\",\"width\":730,\"height\":410,\"caption\":\"enable ssl connection mysql\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ubiq.co\/tech-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Enable SSL\/TLS for MySQL in Ubuntu\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#website\",\"url\":\"https:\/\/ubiq.co\/tech-blog\/\",\"name\":\"Ubiq BI\",\"description\":\"Build dashboards &amp; reports in minutes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ubiq.co\/tech-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc\",\"name\":\"Sreeram Sreenivasan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"caption\":\"Sreeram Sreenivasan\"},\"description\":\"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/sreeram-sreenivasan\/\"],\"url\":\"https:\/\/ubiq.co\/tech-blog\/author\/wordpress\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Enable SSL\/TLS for MySQL in Ubuntu - Ubiq BI","description":"MySQL allows SSL\/TLS connections with SSL certificate. Here is how to enable SSL\/TLS for MySQL for Ubuntu.","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:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/","og_locale":"en_US","og_type":"article","og_title":"How to Enable SSL\/TLS for MySQL in Ubuntu - Ubiq BI","og_description":"MySQL allows SSL\/TLS connections with SSL certificate. Here is how to enable SSL\/TLS for MySQL for Ubuntu.","og_url":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/","og_site_name":"Ubiq BI","article_publisher":"https:\/\/www.facebook.com\/ubiqbi","article_published_time":"2020-10-28T04:59:00+00:00","article_modified_time":"2025-08-25T04:31:29+00:00","og_image":[{"width":730,"height":410,"url":"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/enable-ssl-connection-mysql.webp","type":"image\/webp"}],"author":"Sreeram Sreenivasan","twitter_card":"summary_large_image","twitter_creator":"@UbiqBI","twitter_site":"@UbiqBI","twitter_misc":{"Written by":"Sreeram Sreenivasan","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/#article","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/"},"author":{"name":"Sreeram Sreenivasan","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"headline":"How to Enable SSL\/TLS for MySQL in Ubuntu","datePublished":"2020-10-28T04:59:00+00:00","dateModified":"2025-08-25T04:31:29+00:00","mainEntityOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/"},"wordCount":514,"commentCount":0,"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/enable-ssl-connection-mysql.webp?fit=730%2C410&ssl=1","keywords":["secure connection","ssl","tls"],"articleSection":["MySQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/","url":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/","name":"How to Enable SSL\/TLS for MySQL in Ubuntu - Ubiq BI","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/#primaryimage"},"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/enable-ssl-connection-mysql.webp?fit=730%2C410&ssl=1","datePublished":"2020-10-28T04:59:00+00:00","dateModified":"2025-08-25T04:31:29+00:00","author":{"@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"description":"MySQL allows SSL\/TLS connections with SSL certificate. Here is how to enable SSL\/TLS for MySQL for Ubuntu.","breadcrumb":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/#primaryimage","url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/enable-ssl-connection-mysql.webp?fit=730%2C410&ssl=1","contentUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/enable-ssl-connection-mysql.webp?fit=730%2C410&ssl=1","width":730,"height":410,"caption":"enable ssl connection mysql"},{"@type":"BreadcrumbList","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-tls-for-mysql-in-ubuntu\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ubiq.co\/tech-blog\/"},{"@type":"ListItem","position":2,"name":"How to Enable SSL\/TLS for MySQL in Ubuntu"}]},{"@type":"WebSite","@id":"https:\/\/ubiq.co\/tech-blog\/#website","url":"https:\/\/ubiq.co\/tech-blog\/","name":"Ubiq BI","description":"Build dashboards &amp; reports in minutes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ubiq.co\/tech-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc","name":"Sreeram Sreenivasan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","caption":"Sreeram Sreenivasan"},"description":"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.","sameAs":["https:\/\/www.linkedin.com\/in\/sreeram-sreenivasan\/"],"url":"https:\/\/ubiq.co\/tech-blog\/author\/wordpress\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2025\/06\/enable-ssl-connection-mysql.webp?fit=730%2C410&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/pbGGTT-2dP","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/8545","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/comments?post=8545"}],"version-history":[{"count":3,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/8545\/revisions"}],"predecessor-version":[{"id":9268,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/8545\/revisions\/9268"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media\/8546"}],"wp:attachment":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media?parent=8545"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/categories?post=8545"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/tags?post=8545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}