{"id":453,"date":"2015-11-30T13:01:51","date_gmt":"2015-11-30T13:01:51","guid":{"rendered":"http:\/\/www.hostingnotes.com\/?p=453"},"modified":"2017-09-19T14:39:39","modified_gmt":"2017-09-19T14:39:39","slug":"install-mysql-windows-7","status":"publish","type":"post","link":"https:\/\/www.webdevelopersnotes.com\/install-mysql-windows-7","title":{"rendered":"How do I install MySQL on Windows 7?"},"content":{"rendered":"<p>This step by step guide on how to install MySQL on Windows 7 is in continuation to the Apache and PHP installations on the same operating system. Before we begin, I like you to determine the system type &#8211; whether your computer is 32 bit or 64 bit.<\/p>\n<p>This is important as I had a horrendous time in troubleshooting PHP-MySQL connection problem, details of which can be found at <a href=\"\/\/www.webdevelopersnotes.com\/mysql-windows-7-64bit-installation-with-apache-and-php\" title=\"MySQL database on a 64 bit Windows 7 computer\">MySQL on a 64 bit Windows 7<\/a>. You can know the system type from &#8220;<span class=\"pm\">Control Panel<\/span>&#8221; -&gt; &#8220;<span class=\"pm\">System and Security<\/span>&#8221; -&gt; &#8220;<span class=\"pm\">System<\/span>&#8220;.<\/p>\n<div class=\"clr\"><\/div>\n<div class=\"bottom-ads\">\n<h4>Sponsored Links<\/h4>\n<script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\n<!-- Inner Page Top - Non Responsive -->\n<ins class=\"adsbygoogle\"\n     style=\"display:inline-block;width:336px;height:280px\"\n     data-ad-client=\"ca-pub-1043128618639037\"\n     data-ad-slot=\"5670477364\"><\/ins>\n<script>\n(adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n<\/div>\n<div class=\"clr\"><\/div>\n<h2>Instructions to install MySQL on Windows 7<\/h2>\n<p>The instructions with the screenshots have been presented in a slideshow below; please refer these when in doubt. I would be guiding you through the process of downloading MySQL and setting it up on your Windows 7 computer. The installation process is not very difficult, so don&#8217;t be intimidated by the large number of slides; I just wanted to be thorough.<\/p>\n<div class=\"swiper-container\">\n<ul class=\"swiper-wrapper\">\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/mysql-downloads-page.jpg\" alt=\"The MySQL downloads page - Community Server.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/windows-x86-64-bit-msi-installer-file.jpg\" alt=\"Download the Windows (x86, 64-bit) MSI Installer file.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/register-mysql-account-or-skip.jpg\" alt=\"Register for an account at the MySQL web site or simply skip the step and go straight to the downloads.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/choose-mirror-site.jpg\" alt=\"Choose a download mirror site.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/run-mysql-installer-file.jpg\" alt=\"Double-click on the MySQL installer (.msi) file. Choose Run when prompted.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/mysql-welcome-screen-next.jpg\" alt=\"MySQL welcome screen - click the Next button.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/license-agreement.jpg\" alt=\"Accept the terms in the License Agreement.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/custom-installation.jpg\" alt=\"Choose Custom installation.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/browse-change-folder.jpg\" alt=\"Click Browse to change default folder to which MySQL installs.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/select-folder-name.jpg\" alt=\"Select the folder name.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/change-mysql-folder.jpg\" alt=\"Change MySQL install folder to C:\\MySQL.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/install-directory-changed.jpg\" alt=\"Install directory is not changed.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/ready-to-install.jpg\" alt=\"Everything's set and you are ready to install MySQL.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/mysql-installation-progress-bar.jpg\" alt=\"The progress bar will start moving in a short while.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/copying-files.jpg\" alt=\"MySQL being installed and the files being copied on your computer.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/promotion-screen.jpg\" alt=\"Click Next on promotion screens.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/click-finish.jpg\" alt=\"Put a checkmark here and click Finish.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/mysql-instance-configuration-wizard.jpg\" alt=\"MySQL Instance Configuration Wizard launched - click the Next button.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/detailed-configuration.jpg\" alt=\"Choose the Detailed Configuration option.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/select-developer-machine-option.jpg\" alt=\"Select Developer Machine as you would be using it for learning and development.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/multifunctional-database.jpg\" alt=\"Go with the default - Multifunctional Database.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/select-drive.jpg\" alt=\"Select the drive - the default is just fine.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/number-of-connections.jpg\" alt=\"The Decision Support (DSS)\/OLAP option is good for your developer machine - 20 connections are assumed.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/enable-strict-mode.jpg\" alt=\"Select Enable Strict Mode - click Next button.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/choose-character-set.jpg\" alt=\"Choose character set - Standard is fine for English and other West European languages.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/include-bin-directory-windows-path.jpg\" alt=\"Include MySQL bin directory in Windoes PATH.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/set-up-mysql-security.jpg\" alt=\"Set up MySQL Server security.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/type-password-twice.jpg\" alt=\"Type in the password twice.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/execute-instance-configuration-wizard.jpg\" alt=\"Instance Configuration Wizard is ready with all information - Click Execute button.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/mysql-instance-configured.jpg\" alt=\"MySQL instance configured successfully - click Finish.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/locate-mysql-command-line-client.jpg\" alt=\"Locate the MySQL Command Live Client from the Programs menu.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/open-mysql-command-line-client.jpg\" alt=\"Open the MySQL Command Line Client.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/enter-password.jpg\" alt=\"Enter the password (which is replaced by asterisk symbols).\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/mysql-prompt.jpg\" alt=\"The mysql prompt is shown and awaits commands from you.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/show-databases.jpg\" alt=\"Show Databases command displays the databases available on your server.\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/open-php-ini-edit-notepad.jpg\" alt=\"Right-click on php.ini and open it with Notepad\"\/><\/li>\n<li class=\"swiper-slide\"><img decoding=\"async\" src=\"\/\/www.webdevelopersnotes.com\/slideshow\/install-mysql-windows-7\/uncomment-mysql-extensions.jpg\" alt=\"Uncomment the two MySQL extensions by removing the semicolons\"\/><\/li>\n<\/ul>\n<div class=\"swiper-pagination\"><\/div>\n<div class=\"swiper-button-next\"><\/div>\n<div class=\"swiper-button-prev\"><\/div>\n<\/div>\n<h2>Download MySQL installer file<\/h2>\n<ol class=\"slide-steps\">\n<li>Be sure to choose the MySQL installer that corresponds to your system type. For me, it was the Windows (x86, 64-bit) system file, <span class=\"codeword\">mysql-5.5.16-winx64.msi<\/span>, which was 32.6 MB in size.<\/li>\n<li>The direct link to the page from where you can download MySQL is <a href=\"\/\/www.mysql.com\/downloads\/mysql\" title=\"MySQL downloads\" target=\"_blank\">http:\/\/www.mysql.com\/downloads\/mysql\/<\/a>; please click on that link to load it in a browser [Slide 1]. Scroll down and locate the MSI installer file corresponding to your system type &#8211; 32 bit or 64 bit. Click the <span class=\"pm\">Download<\/span> link\/button beside it [Slide 2].<\/li>\n<li>You will be asked to register or sign in at your account. Registering has it&#8217;s benefits, but if you are in a hurry, simply click on the <span class=\"pm\">No thanks, just take me to the downloads!<\/span> link [Slide 3].<\/li>\n<li>A list of sites from where you can download the MySQL file will be displayed [Slide 4]. Choose a &#8216;mirror&#8217; which is closest to your geographical location to get the file fast. FYI, there is no problem in choosing a site located in Europe even though you are in the United States.<\/li>\n<\/ol>\n<h2>Setting up MySQL and making it work on your Windows 7 computer<\/h2>\n<ol class=\"slide-steps\">\n<li>Move to the folder to which the MSI file was downloaded and double-click on it to start MySQL installation &#8211; click &#8220;<span class=\"pm\">Run<\/span>&#8221; when prompted [Slide 5].<\/li>\n<li>Click &#8220;<span class=\"pm\">Next<\/span>&#8221; button in the introductory window [Slide 6]. Accept the terms in the License Agreement by checking the box and hit &#8220;<span class=\"pm\">Next<\/span>&#8221; [Slide 7]<\/li>\n<li>In the following screen, select <strong>Custom installation<\/strong> which will allow you to specify the folder to which MySQL will be installed [Slide 8]. FYI, choosing <strong>Typical<\/strong> will put MySQL deep down in the &#8220;<span class=\"pm\">Program Files<\/span>&#8221; folder.<\/li>\n<li>Click the &#8220;<span class=\"pm\">Browse<\/span>&#8221; button [Slide 9] and enter <span class=\"codeword\">C:\\MySQL<\/span> in the Folder name field. Hit &#8220;<span class=\"pm\">OK<\/span>&#8221; when done [Slides 10 and 11].<\/li>\n<li>The installer will change the MySQL installation folder to the one specified by you &#8211; <span class=\"codeword\">C:\\MySQL<\/span> [Slide 12].<\/li>\n<li>You are now ready to install MySQL on Windows 7 operating system. Click &#8220;<span class=\"pm\">Install<\/span>&#8221; [Slide 13].<\/li>\n<li>It would take some time for the progress bar to start moving&#8230; be patient [Slides 14 and 15].<\/li>\n<li>You may also get messages along the way &#8211; simply click on &#8220;<span class=\"pm\">Next<\/span>&#8221; to proceed [Slide 16].<\/li>\n<li>When the process finishes, you&#8217;ll get to see the final screen. <strong>Congratulations &#8211; MySQL has been installed on your computer<\/strong>. You are now prompted to <em>Configure<\/em> the MySQL server; click &#8220;<span class=\"pm\">Finish<\/span>&#8221; [Slide 17].<\/li>\n<\/ol>\n<h2>Configuring a MySQL instance<\/h2>\n<ol class=\"slide-steps\">\n<li>The MySQL Instance Configuration Wizard will now launch [Slide 18]; click &#8220;<span class=\"pm\">Next<\/span>&#8221; to proceed. Please note that you cannot use MySQL until an instance has been configured, so these steps are quite important.<\/li>\n<li>Select &#8220;<strong>Detailed Configuration<\/strong>&#8221; option [Slide 19].<\/li>\n<li>Choose &#8220;<strong>Developer Machine<\/strong>&#8221; [Slide 20].<\/li>\n<li>I suggest going ahead with &#8220;<strong>Multifunctional Database<\/strong>&#8221; unless you know what you are doing [Slide 21].<\/li>\n<li>In the following screen, don&#8217;t mess with the default values and click &#8220;<span class=\"pm\">Next<\/span>&#8221; [Slide 22].<\/li>\n<li>The same goes for the subsequent screen; click &#8220;<span class=\"pm\">Next<\/span>&#8221; [Slide 23].<\/li>\n<li>For the networking options configuration, put a check mark in front of &#8220;<span class=\"pm\">Enable Strict Mode<\/span>&#8221; if it&#8217;s not there [Slide 24].<\/li>\n<li>Move ahead with the &#8220;<span class=\"pm\">Standard Character Set<\/span>&#8221; [Slide 25].<\/li>\n<li>Yes, it&#8217;s recommended to install MySQL as a Windows service and have the system include the MySQL bin directory in the Windows PATH variable [Slide 26].<\/li>\n<li>The password for the MySQL server instance has to be typed in twice [Slides 27 and 28]. Remember to keep a note of it and <strong>don&#8217;t lose it<\/strong>. The password doesn&#8217;t have to be very strong because, I suppose, you would be using MySQL on your computer for learning\/development and NOT production.<\/li>\n<li>The configuration wizard has received all the information it needs and is ready to create a MySQL server instance. Click &#8220;<span class=\"pm\">Execute<\/span>&#8221; button [Slides 29 and 30].<\/li>\n<li>Ignore messages from the anti-virus program and answer in the affirmative when the Windows 7 UAC (User Account Control) asks whether you want to run MySQLInstanceConfig.exe file. Generally, the instance should be configured without any problem.<br \/>\nHowever, if the MySQL Instance Configuration Wizard becomes unresponsive (the window shows a &#8216;Not Responding&#8217; message), launch the Task Manager either from the Control Panel or use the old Ctrl-Alt-Del key combination and kill the program. Now go to <span class=\"pm\">C:\\MySQL\\bin<\/span> folder and double click on <span class=\"codeword\">MySQLInstanceCOnfig.exe<\/span> file to launch the wizard once again.<\/li>\n<\/ol>\n<h2>Checking the MySQL installation<\/h2>\n<p>The easiest way to check MySQL installation and confirm that it&#8217;s working properly is to use the <strong>MySQL Command Line Client<\/strong>. Fire it up from &#8220;<span class=\"pm\">All Programs<\/span>&#8221; -&gt; &#8220;<span class=\"pm\">MySQL<\/span>&#8221; -&gt; &#8220;<span class=\"pm\">MySQL Server 5.5<\/span>&#8220;[Slide 31].<\/p>\n<p>Now enter the MySQL password &#8211; the characters you type will be replaced by the asterisk sign (the password is not shown for security reasons &#8211; obviously) [Slides 32 and 33].<\/p>\n<p>The MySQL client displays the <span class=\"codeword\">mysql&gt;<\/span> prompt on successful login [Slide 34]. Type <span class=\"codeword\">show databases;<\/span> (the semi-colon at the end is not a typo) and hit the enter key. This simple SQL command instructs MySQL to display the names of the installed databases and there should be four of these. Hurray! Rejoice because you have been able to correctly install MySQL on Windows 7 [Slide 35]!<\/p>\n<h2>Configuring PHP to work with the MySQL installation<\/h2>\n<p>The newly installed MySQL Server will run on it&#8217;s own without any problem and is an ideal platform to learn the SQL (Structured Query Language). However, if you want to use it with PHP, changes have to be made to the <span class=\"codeword\">php.ini<\/span> file. The appropriate &#8216;marriage&#8217; of MySQL and PHP is essential for setting up program suites such as WordPress&#8230; and I&#8217;m sure many of you would be interested in that, right?<\/p>\n<p>The PHP configuration file (<span class=\"codeword\">php.ini<\/span>) is located in the install directory which should be <span class=\"codeword\">C:\\PHP<\/span> if you have followed my instructions on <a href=\"\/\/www.webdevelopersnotes.com\/install-php-windows-7\" title=\"Instructions on how to install PHP on a Windows 7 computer - screenshots included for beginners\">how to install PHP on Windows 7 computer<\/a>. We now have to modify this file so that all the three, Apache, PHP and MySQL, work together.<\/p>\n<p>Move to the PHP install folder, right-click on <span class=\"codeword\">php.ini<\/span> and open it with Notepad [Slide 36]. Using the &#8216;Find&#8217; feature (Ctrl-F or <span class=\"pm\">Edit<\/span> -&gt; <span class=\"pm\">Find<\/span>), locate the <strong>Dynamic Extensions<\/strong> section. Scrolling down, you should see a whole bunch of PHP extension lines. Remove the semicolon in front of the two mysql extensions (listed below) [Slide 37].<\/p>\n<pre>\r\nextension=php_mysql.dll\r\nextension=php_mysqli.dll\r\n<\/pre>\n<p>Save the <span class=\"codeword\">php.ini<\/span> file and (IMPORTANT) restart the computer &#8211; this will give you time to stretch your legs. By the way, as I had mentioned in the beginning, you need a <a href=\"\/\/www.webdevelopersnotes.com\/what-is-web-server\" title=\"What is a web server? Definition and a brief on it's function\">web server<\/a> for PHP to work &#8211; read <a href=\"\/\/www.webdevelopersnotes.com\/install-apache-windows-7\" title=\"Install the Apache web server on Windows 7 computers - laptops and desktops\">install Apache on Windows 7<\/a> for instructions.<\/p>\n<p>Finally, if you have already been using MySQL on another computer you can quickly transfer databases and tables using <span class=\"codeword\">mysqldump<\/span> and the <span class=\"codeword\">mysql<\/span> programs.<\/p>\n","protected":false},"excerpt":{"rendered":"This step by step guide on how to install MySQL on Windows 7 is in continuation to the Apache and PHP installations on the same operating system. Before we begin, I like you to determine the system type &#8211; whether your computer is 32 bit or 64 bit. This is important as I had a [&hellip;]","protected":false},"author":1,"featured_media":8503,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[6,52,48,27],"tags":[],"class_list":["post-453","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-do-i","category-mysql","category-programming","category-web-development"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.webdevelopersnotes.com\/wp-json\/wp\/v2\/posts\/453","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webdevelopersnotes.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webdevelopersnotes.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webdevelopersnotes.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webdevelopersnotes.com\/wp-json\/wp\/v2\/comments?post=453"}],"version-history":[{"count":0,"href":"https:\/\/www.webdevelopersnotes.com\/wp-json\/wp\/v2\/posts\/453\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webdevelopersnotes.com\/wp-json\/wp\/v2\/media\/8503"}],"wp:attachment":[{"href":"https:\/\/www.webdevelopersnotes.com\/wp-json\/wp\/v2\/media?parent=453"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webdevelopersnotes.com\/wp-json\/wp\/v2\/categories?post=453"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webdevelopersnotes.com\/wp-json\/wp\/v2\/tags?post=453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}