{"id":8489,"date":"2020-12-02T07:48:00","date_gmt":"2020-12-02T07:48:00","guid":{"rendered":"https:\/\/ubiq.co\/tech-blog\/?p=8489"},"modified":"2025-08-29T04:29:25","modified_gmt":"2025-08-29T04:29:25","slug":"how-to-run-multiple-mysql-instances-on-same-machine","status":"publish","type":"post","link":"https:\/\/ubiq.co\/tech-blog\/how-to-run-multiple-mysql-instances-on-same-machine\/","title":{"rendered":"How to Run Multiple MySQL Instances on Same Machine"},"content":{"rendered":"\n<p>MySQL is a popular database used by many organizations. Sometimes database administrators may need to run multiple MySQL instances on single server. For example, you may need to test different MySQL instances for staging, testing and production. In this article, we will look at how to run multiple MySQL instances on same machine, but different ports, with different logging files and configuration parameters.<\/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-run-multiple-mysql-instances-on-same-machine\/#How_to_Run_Multiple_MySQL_Instances_on_Same_Machine\" >How to Run Multiple MySQL Instances on Same Machine<\/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-run-multiple-mysql-instances-on-same-machine\/#1_Open_MySQL_configuration_file\" >1. Open MySQL configuration file<\/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-run-multiple-mysql-instances-on-same-machine\/#2_Configure_multiple_MySQL_instances\" >2. Configure multiple MySQL instances<\/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-run-multiple-mysql-instances-on-same-machine\/#3_Manage_multiple_instances\" >3. Manage multiple instances<\/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-run-multiple-mysql-instances-on-same-machine\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Run_Multiple_MySQL_Instances_on_Same_Machine\"><\/span>How to Run Multiple MySQL Instances on Same Machine<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Here are the steps to run multiple MySQL instances on same machine.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Open_MySQL_configuration_file\"><\/span>1. Open MySQL configuration file<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Typically, you will find MySQL configuration file at <em>\/etc\/mysql\/my.cnf<\/em>. Open terminal and run the following command to open MySQL configuration file in text editor.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo vi \/etc\/mysql\/my.cnf<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Configure_multiple_MySQL_instances\"><\/span>2. Configure multiple MySQL instances<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>You will find the default MySQL configuration something similar to what is shown below.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[mysqld] \nuser = mysql \npid-file = \/var\/run\/mysqld\/mysqld.pid \nsocket = \/var\/run\/mysqld\/mysqld.sock \nport = 3306 \ndatadir = \/data\/mysql\/mysql<\/pre>\n\n\n\n<p>Copy+Paste the above block of code below it in the same file. Replace<em> [mysqld]<\/em> with [<em>mysqld1]<\/em> and change port value to 3307. This will make the new instance <em>mysqld1<\/em> run on a different port 3307 with a different process name mysqld1. Similarly, change file names of pid-file, socket and datadir variables by as shown below.<strong> <\/strong><\/p>\n\n\n\n<p><strong>Make sure that you copy the datadir folder for each instance below.<\/strong> Also ensure that user <em>mysql<\/em> user has access permissions to it. Each instance needs its own data directory.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[<strong>mysqld1<\/strong>] \nuser = mysql \npid-file = \/var\/run\/mysqld\/<strong>mysqld1<\/strong>.pid \nsocket = \/var\/run\/mysqld\/<strong>mysqld1<\/strong>.sock \nport = <strong>3307<\/strong> \ndatadir = \/data\/mysql\/<strong>mysql1<\/strong><\/pre>\n\n\n\n<p>Now <em>mysqld1<\/em> will run as a separate instance than <em>mysqld<\/em><\/p>\n\n\n\n<p>Similarly, you can create more instances as shown below, each with a different name, pid file, socket file, port number and datadir values. They all need to have the same system user so that it can easily create and manage necessary files.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[mysqld2] \nuser = mysql \npid-file = \/var\/run\/mysqld\/mysqld2.pid \nsocket = \/var\/run\/mysqld\/mysqld2.sock \nport = 3308 \ndatadir = \/data\/mysql\/mysql2 \n.... \n[mysqldN] \nuser = mysql \npid-file = \/var\/run\/mysqld\/mysqldN.pid \nsocket = \/var\/run\/mysqld\/mysqldN.sock \nport = N \ndatadir = \/data\/mysql\/mysqlN<\/pre>\n\n\n\n<p>Make sure that you provide different pid&nbsp;file, socket file and data dir for each instance and ensure that user <em>mysql<\/em> has required directory permissions because the <em>mysql<\/em>&nbsp;user should be able to create required files and directories.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Manage_multiple_instances\"><\/span>3. Manage multiple instances<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>You can start each instance separately using <em>mysqld<\/em> command below. Replace <em>mysqlN<\/em> with your choice of instance (e.g mysql1, mysql2, etc)<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysqld --initialize --user=mysql --datadir=\/home\/mysql\/<strong>mysqlN<\/strong><\/pre>\n\n\n\n<p>If for some reason, the above configuration does not work for you, then copy the my.cnf file to <em>\/etc\/my.cnf<\/em> location and try again. Sometimes, mysql does not register multiple instances configured at <em>\/etc\/mysql\/my.cnf<\/em><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo cp \/etc\/mysql\/my.cnf \/etc\/my.cnf<\/pre>\n\n\n\n<p>If you want to log into any specific instance (e.g mysqld1) from command line, you need to specify its socket file location with -S option. Otherwise, you will be logged into the default MySQL instance.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql -u root -p -S \/var\/run\/mysqld\/<strong>mysqld1<\/strong>.sock<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Hopefully, this article will help you configure and manage multiple MySQL instances on same server. The basic idea is to create separate configuration for each desired instance with its own process name, port number, pid file, socket file and datadir attributes. You can use it to easily create 3 instances for your website &#8211; development, testing and production &#8211; or for some other purpose. Please remember, you need to issue separate commands to run or connect to each instance. You cannot connect to one instance from another instance. Nevertheless, it is a very handy feature to quickly spin up multiple instances without making much changes.<\/p>\n\n\n\n<p>Need a reporting tool for MySQL? <a href=\"http:\/\/ubiq.co\/\">Ubiq<\/a>&nbsp;makes it easy to visualize data in minutes, and monitor in real-time dashboards.&nbsp;<a href=\"http:\/\/ubiq.co\/accounts\/register\">Try it<\/a>&nbsp;Today!<\/p>\n\n\n\n<p>Also read:<br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-insert-multiple-rows-in-mysql\/\">How to Insert Multiple Rows in MySQL<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-update-a-column-based-on-another-column-in-sql\/\">How to Update Column Based on Another Column in MySQL<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-escape-single-quote-special-characters-in-mysql\/\">How to Escape Single Quote, Special Characters in MySQL<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes you may need to run multiple MySQL server on single machine. Here is how to run multiple MySQL instances on same machine.<\/p>\n","protected":false},"author":1,"featured_media":8492,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[324],"tags":[471],"class_list":["post-8489","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mysql","tag-multiple-instances"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Run Multiple MySQL Instances on Same Machine - Ubiq BI<\/title>\n<meta name=\"description\" content=\"Sometimes you may need to run multiple MySQL server on single machine. Here is how to run multiple MySQL instances on same machine.\" \/>\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-run-multiple-mysql-instances-on-same-machine\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Run Multiple MySQL Instances on Same Machine - Ubiq BI\" \/>\n<meta property=\"og:description\" content=\"Sometimes you may need to run multiple MySQL server on single machine. Here is how to run multiple MySQL instances on same machine.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ubiq.co\/tech-blog\/how-to-run-multiple-mysql-instances-on-same-machine\/\" \/>\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-12-02T07:48:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-29T04:29:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/12\/run-multiple-instances-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-run-multiple-mysql-instances-on-same-machine\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-run-multiple-mysql-instances-on-same-machine\\\/\"},\"author\":{\"name\":\"Sreeram Sreenivasan\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\"},\"headline\":\"How to Run Multiple MySQL Instances on Same Machine\",\"datePublished\":\"2020-12-02T07:48:00+00:00\",\"dateModified\":\"2025-08-29T04:29:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-run-multiple-mysql-instances-on-same-machine\\\/\"},\"wordCount\":577,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-run-multiple-mysql-instances-on-same-machine\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/run-multiple-instances-mysql.webp?fit=730%2C410&ssl=1\",\"keywords\":[\"multiple instances\"],\"articleSection\":[\"MySQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-run-multiple-mysql-instances-on-same-machine\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-run-multiple-mysql-instances-on-same-machine\\\/\",\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-run-multiple-mysql-instances-on-same-machine\\\/\",\"name\":\"How to Run Multiple MySQL Instances on Same Machine - Ubiq BI\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-run-multiple-mysql-instances-on-same-machine\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-run-multiple-mysql-instances-on-same-machine\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/run-multiple-instances-mysql.webp?fit=730%2C410&ssl=1\",\"datePublished\":\"2020-12-02T07:48:00+00:00\",\"dateModified\":\"2025-08-29T04:29:25+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\"},\"description\":\"Sometimes you may need to run multiple MySQL server on single machine. Here is how to run multiple MySQL instances on same machine.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-run-multiple-mysql-instances-on-same-machine\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-run-multiple-mysql-instances-on-same-machine\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-run-multiple-mysql-instances-on-same-machine\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/run-multiple-instances-mysql.webp?fit=730%2C410&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/run-multiple-instances-mysql.webp?fit=730%2C410&ssl=1\",\"width\":730,\"height\":410,\"caption\":\"run multiple instances in mysql\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-run-multiple-mysql-instances-on-same-machine\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Run Multiple MySQL Instances on Same Machine\"}]},{\"@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 Run Multiple MySQL Instances on Same Machine - Ubiq BI","description":"Sometimes you may need to run multiple MySQL server on single machine. Here is how to run multiple MySQL instances on same machine.","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-run-multiple-mysql-instances-on-same-machine\/","og_locale":"en_US","og_type":"article","og_title":"How to Run Multiple MySQL Instances on Same Machine - Ubiq BI","og_description":"Sometimes you may need to run multiple MySQL server on single machine. Here is how to run multiple MySQL instances on same machine.","og_url":"https:\/\/ubiq.co\/tech-blog\/how-to-run-multiple-mysql-instances-on-same-machine\/","og_site_name":"Ubiq BI","article_publisher":"https:\/\/www.facebook.com\/ubiqbi","article_published_time":"2020-12-02T07:48:00+00:00","article_modified_time":"2025-08-29T04:29:25+00:00","og_image":[{"width":730,"height":410,"url":"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/12\/run-multiple-instances-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-run-multiple-mysql-instances-on-same-machine\/#article","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-run-multiple-mysql-instances-on-same-machine\/"},"author":{"name":"Sreeram Sreenivasan","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"headline":"How to Run Multiple MySQL Instances on Same Machine","datePublished":"2020-12-02T07:48:00+00:00","dateModified":"2025-08-29T04:29:25+00:00","mainEntityOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-run-multiple-mysql-instances-on-same-machine\/"},"wordCount":577,"commentCount":0,"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-run-multiple-mysql-instances-on-same-machine\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/12\/run-multiple-instances-mysql.webp?fit=730%2C410&ssl=1","keywords":["multiple instances"],"articleSection":["MySQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ubiq.co\/tech-blog\/how-to-run-multiple-mysql-instances-on-same-machine\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-run-multiple-mysql-instances-on-same-machine\/","url":"https:\/\/ubiq.co\/tech-blog\/how-to-run-multiple-mysql-instances-on-same-machine\/","name":"How to Run Multiple MySQL Instances on Same Machine - Ubiq BI","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-run-multiple-mysql-instances-on-same-machine\/#primaryimage"},"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-run-multiple-mysql-instances-on-same-machine\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/12\/run-multiple-instances-mysql.webp?fit=730%2C410&ssl=1","datePublished":"2020-12-02T07:48:00+00:00","dateModified":"2025-08-29T04:29:25+00:00","author":{"@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"description":"Sometimes you may need to run multiple MySQL server on single machine. Here is how to run multiple MySQL instances on same machine.","breadcrumb":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-run-multiple-mysql-instances-on-same-machine\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ubiq.co\/tech-blog\/how-to-run-multiple-mysql-instances-on-same-machine\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-run-multiple-mysql-instances-on-same-machine\/#primaryimage","url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/12\/run-multiple-instances-mysql.webp?fit=730%2C410&ssl=1","contentUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/12\/run-multiple-instances-mysql.webp?fit=730%2C410&ssl=1","width":730,"height":410,"caption":"run multiple instances in mysql"},{"@type":"BreadcrumbList","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-run-multiple-mysql-instances-on-same-machine\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ubiq.co\/tech-blog\/"},{"@type":"ListItem","position":2,"name":"How to Run Multiple MySQL Instances on Same Machine"}]},{"@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\/2020\/12\/run-multiple-instances-mysql.webp?fit=730%2C410&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/pbGGTT-2cV","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/8489","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=8489"}],"version-history":[{"count":3,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/8489\/revisions"}],"predecessor-version":[{"id":9335,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/8489\/revisions\/9335"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media\/8492"}],"wp:attachment":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media?parent=8489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/categories?post=8489"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/tags?post=8489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}