Quick and easy way to setup a PHP+Apache+MySql Development Environment on Windows.
In this article I will show you how to quickly setup an environment to get you started with building (or learning to build) PHP/MySQL applications and websites.
One of the simplest package to use is WAMP Server (for Windows development environment). The acronym WAMP is short for “Windows Apache MySQL PHP”. WAMP Server also comes with PHPMyAdmin to allow you to create and to easily manage your databases.
Step 1. Download and install WAMP Server
- Go to [http://www.wampserver.com/en/#download-wrapper] and be sure to select the right version for your OS. WAMP Server comes in both 32 and 64 bits installation.
- Before you begin the installation, ensure that no other application on your computer is running on ports 80. Messenger programs like Skype and other web-based applications should be momentarily disabled to ensure a successful installation and startup of WAMP server.
- Follow the default installations options and all should be good. The default install location is c:\wamp.
Step 2. Configure WAMP Server to work better for you.
- You can easily toggle features for Apache, PHP and MySQL by clicking on the WAMP Icon in the system tray area and navigating to the options for the services.
- Ensure that the services for PHP are turned on to match those depicted in the attached configuration images.
Step 3. Set your MySQL Server Password (optional)
- The default setup for MySQL has the user as “root” and the password is empty (blank). If you click on the WAMP server icon in the system tray, navigate to the MySQL Service and click on MySQL Console it would log you in without prompting you for a password.
- At the prompt type
update mysql.user set password = password(‘yournewpassword’) where user = ‘root'; [hit enter]
flush privileges; [hit enter]
once there are no errors, type
exit; [hit enter]
- Restart all services and change/set the password for PHPMyAdmin.
- Go to c:\wamp\apps\phpmyadmin…\ and open the file config.inc.php
- Set the password line as $cfg[‘Servers’][$i][‘password’] = ‘yournewpassword';
- Save the file and try to open PHPMyAdmin in your browser by going to the address localhost/phpmyadmin
And this will complete your installation, configure your WAMP Server and set your MySQL password. Please let us hear from you by providing your questions and feed-back below.
– Girendra Persaud (November 2012)