{"id":1794,"date":"2017-07-13T13:12:09","date_gmt":"2017-07-13T07:42:09","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=1794"},"modified":"2026-09-11T12:30:04","modified_gmt":"2026-09-11T07:00:04","slug":"mysql-installation-windows-server-2012","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/mysql-installation-windows-server-2012\/","title":{"rendered":"MySQL Installation on Windows Server 2012"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Introduction<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">MySQL is a widely used open-source relational database management system (RDBMS) used to store, manage, and retrieve application data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This document provides a step-by-step procedure for installing <strong>MySQL on Windows Server 2012<\/strong> using the <strong>Microsoft Web Platform Installer (Web PI)<\/strong>.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> MySQL 5.1 is an old and unsupported version. It may be used only for legacy applications that specifically require it. For production environments, use a currently supported MySQL version that is compatible with the application and operating system.<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">Prerequisites<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Before starting the installation, ensure the following requirements are met:<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Server Requirements<\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Windows Server 2012 is installed and running.<\/li>\n\n\n\n<li>Administrator access is available.<\/li>\n\n\n\n<li>The server has sufficient disk space.<\/li>\n\n\n\n<li>The server has network\/internet access if downloading MySQL through Web PI.<\/li>\n\n\n\n<li>Windows Firewall is configured according to the application requirements.<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\">Software Requirements<\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Microsoft Web Platform Installer (Web PI).<\/li>\n\n\n\n<li>MySQL package compatible with Windows Server 2012.<\/li>\n\n\n\n<li>Application requirements\/documentation, if MySQL is being installed for a specific application.<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\">Information Required<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Keep the following information ready:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>MySQL root password.<\/li>\n\n\n\n<li>MySQL installation directory.<\/li>\n\n\n\n<li>Required MySQL port, normally <strong>3306<\/strong>.<\/li>\n\n\n\n<li>Application database name, username, and password if the database will be used by an application.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Implementation<\/h3>\n\n\n\n<h5 class=\"wp-block-heading\">Step 1: Launch Web Platform Installer<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Download and launch the <strong>Web Platform Installer (Web PI)<\/strong> by running:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">wpilauncher.exe<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Run the installer with administrative privileges if required.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">Step 2: Search for MySQL<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Once Web PI is opened:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Click the <strong>Search<\/strong> option.<\/li>\n\n\n\n<li>Search for:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">MySQL<\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>Review the available MySQL packages.<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">Step 3: Select MySQL<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Select the MySQL version compatible with the server and application.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For legacy environments, the original procedure may use:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">MySQL Windows 5.1<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Click:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Add \u2192 Install<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">to start the installation.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">Step 4: Configure the Root Password<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">During installation, you will be prompted to configure the MySQL <strong>root<\/strong> account.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Enter a strong password.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Username: root<br>Password: <\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Important:<\/strong> Store the root password securely. Do not share it through email, chat, or documentation.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">Step 5: Accept the License Agreement<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Review the MySQL licensing agreement.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Click:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>I Accept<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The installer will then download and install the selected MySQL package.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">Step 6: Complete the Installation<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Wait for the installation to complete.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once the installation has finished, click:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Finish<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">MySQL should now be installed on the Windows Server.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">Verify MySQL Installation<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">After installation, open <strong>Command Prompt<\/strong> as Administrator.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Navigate to the MySQL <code>bin<\/code> directory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For MySQL 5.1, the default location may be:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd \"C:\\Program Files\\MySQL\\MySQL Server 5.1\\bin\"<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check the installed version:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql --version<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql  Ver 14.14 Distrib 5.1.xx, for Win64<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Connect to MySQL<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql -u root -p<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Enter the root password when prompted.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the login is successful, you should see:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">SELECT VERSION();<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This confirms the MySQL server version.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Exit MySQL using:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">exit;<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">Check MySQL Service<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">MySQL normally runs as a Windows service.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Open:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">services.msc<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Look for a service such as:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">MySQL<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">or:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">MySQL51<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Verify that the service status is:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Running<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can also check from Command Prompt:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sc query MySQL<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If the service name is different, use the actual MySQL service name.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">Check MySQL Port<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The default MySQL port is:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">3306<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can check whether the port is listening:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">netstat -ano | findstr :3306<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If MySQL is listening, you should see a <code>LISTENING<\/code> entry.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">Firewall Configuration<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">If remote applications or servers need to connect to MySQL, TCP port <strong>3306<\/strong> may need to be allowed through Windows Firewall.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, <strong>do not expose MySQL directly to the public internet unless there is a specific requirement and appropriate security controls are in place.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Prefer restricting access to trusted application\/server IP addresses.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">Post-Installation Checks<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">After installation, verify:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>MySQL service is running.<\/li>\n\n\n\n<li>Root login works.<\/li>\n\n\n\n<li>MySQL version is correct.<\/li>\n\n\n\n<li>Port 3306 is listening if required.<\/li>\n\n\n\n<li>Application connectivity works.<\/li>\n\n\n\n<li>Database and user permissions are configured.<\/li>\n\n\n\n<li>Windows Firewall rules are correctly configured.<\/li>\n\n\n\n<li>MySQL error logs do not contain installation\/startup errors.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Conclusion<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">MySQL can be installed on Windows Server 2012 using a compatible installation package and configured as a Windows service.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After installation, the administrator should verify the MySQL service, root login, database connectivity, and required network access.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For legacy applications, older MySQL versions may be required for compatibility. However, <strong>MySQL 5.1 and 5.5 are obsolete and should not be selected for new deployments<\/strong>. Where possible, upgrade the operating system and application and use a currently supported MySQL release.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">FAQs<\/h3>\n\n\n\n<h5 class=\"wp-block-heading\">Q1. What is the default MySQL port?<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">The default MySQL port is:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">3306<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">Q2. What is the default MySQL administrator account?<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">The default administrative account is:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">Q3. How can I check the installed MySQL version?<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql --version<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Or after logging into MySQL:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">SELECT VERSION();<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">Q4. How do I connect to MySQL from Command Prompt?<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Use:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql -u root -p<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then enter the root password.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">Q5. How can I check whether MySQL is running?<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Open:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">services.msc<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">and check the MySQL service.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Alternatively:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sc query MySQL<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">Q6. Where is MySQL installed?<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">For the older MySQL 5.1 installation described above, the default directory is typically:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">C:\\Program Files\\MySQL\\MySQL Server 5.1\\<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The executable files are located under:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">C:\\Program Files\\MySQL\\MySQL Server 5.1\\bin<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">Q7. How do I start MySQL manually?<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">If the MySQL service is configured, it is preferable to start it through Windows Services.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">net start MySQL<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The exact service name may vary.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">Q8. How do I stop MySQL?<\/h5>\n\n\n\n<pre class=\"wp-block-preformatted\">net stop MySQL<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Related Articles:<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/how-to-move-a-mysql-data-directory-to-a-new-location-on-ubuntu-20-04\/\">How To Move a MySQL Data Directory to a New Location on Ubuntu 20.04? &#8211; Pheonix Solutions<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/how-to-change-mysql-user-authentication-plugin-for-password\/\">How to Change MySQL User Authentication Plugin for Password? &#8211; Pheonix Solutions<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Talk to our experts<strong>:<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Looking for the right technology solution for your business?. Our experts can help with\u00a0web hosting, domain registration, DevOps and cloud, software development, web applications, mobile applications, and enterprise solutions. Get in touch with our team\u00a0<a href=\"https:\/\/pheonixsolutions.com\/contact\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction MySQL is a widely used open-source relational database management system (RDBMS) used to store, manage, and retrieve application data. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1019],"tags":[],"class_list":["post-1794","post","type-post","status-publish","format-standard","hentry","category-cloud-aws","psol-cat-cloud-aws"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-sW","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1794","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=1794"}],"version-history":[{"count":5,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1794\/revisions"}],"predecessor-version":[{"id":11662,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1794\/revisions\/11662"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=1794"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=1794"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=1794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}