Home / How Do I / How do I install MySQL on Windows 7?
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 – whether your computer is 32 bit or 64 bit.
This is important as I had a horrendous time in troubleshooting PHP-MySQL connection problem, details of which can be found at MySQL on a 64 bit Windows 7. You can know the system type from “Control Panel” -> “System and Security” -> “System“.
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’t be intimidated by the large number of slides; I just wanted to be thorough.
The easiest way to check MySQL installation and confirm that it’s working properly is to use the MySQL Command Line Client. Fire it up from “All Programs” -> “MySQL” -> “MySQL Server 5.5“[Slide 31].
Now enter the MySQL password – the characters you type will be replaced by the asterisk sign (the password is not shown for security reasons – obviously) [Slides 32 and 33].
The MySQL client displays the mysql> prompt on successful login [Slide 34]. Type show databases; (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]!
The newly installed MySQL Server will run on it’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 php.ini file. The appropriate ‘marriage’ of MySQL and PHP is essential for setting up program suites such as WordPress… and I’m sure many of you would be interested in that, right?
The PHP configuration file (php.ini) is located in the install directory which should be C:\PHP if you have followed my instructions on how to install PHP on Windows 7 computer. We now have to modify this file so that all the three, Apache, PHP and MySQL, work together.
Move to the PHP install folder, right-click on php.ini and open it with Notepad [Slide 36]. Using the ‘Find’ feature (Ctrl-F or Edit -> Find), locate the Dynamic Extensions 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].
extension=php_mysql.dll extension=php_mysqli.dll
Save the php.ini file and (IMPORTANT) restart the computer – this will give you time to stretch your legs. By the way, as I had mentioned in the beginning, you need a web server for PHP to work – read install Apache on Windows 7 for instructions.
Finally, if you have already been using MySQL on another computer you can quickly transfer databases and tables using mysqldump and the mysql programs.
How do I view a deleted web page?
Is there a way to view a deleted web page - one that is no longer available? Yes there is and the solution is quite simple. [more...]
The World Wide Web Hall of Fame has only 6 inductees: Tim Berners-Lee: Inventor of the World Wide Web. Marc Andreessen: Co-creator of Mosaic, the browser that popularised the web. Eric Bina: Co-creator of Mosaic browser and founder of Netscape. Kevin Hughes: A pioneer of the WWW in the US. Rob Hartill: Known for his contributions to the Apache web server and the Internet Movie Database (IMDb). Lou Montulli: Co-creator of Lynx text web browser who innovated several browser technologies like cookies, HTTP proxying etc. [more...]
We use cookies to give you the best possible website experience. By using WebDevelopersNotes.com, you agree to our Privacy Policy