Home arrow Apache arrow Page 4 - Installing PHP under Windows

Installing PHP under Windows

Not a Linux fan? Looking for a hassle-free way of setting up a PHP environment on your Windows box? Read as Matthew guides us through the process of installing Apache, MySQL and PHP on a Windows based machine, otherwise known as WAMP.

Author Info:
By: Matthew Phillips
Rating: 5 stars5 stars5 stars5 stars5 stars / 271
October 22, 2003
  1. · Installing PHP under Windows
  2. · What is it?
  3. · Installation - Apache
  4. · Installation Cont'd - MySQL
  5. · Installation Cont'd - PHP
  6. · Testing It All

print this article

Installing PHP under Windows - Installation Cont'd - MySQL
(Page 4 of 6 )

Next we will be installing MySQL, a free database program. This will be necessary for almost all php scripts beyond any very basic scripts.  Create a temporary directory on the desktop is a good place; we will be getting rid of it soon anyway. Extract the MySQL ZIP file to the temp directory and run the setup.exe. Follow all the onscreen instructions. Once the setup program has finished and installed MySQL, delete the temporary directory.

Click Start -> Run and type cmd in the box, click Ok. This will open a console window (or MS-Dos box). In the console window enter the following commands and check that you receive the correct response:

Enter: cd c:\mysql\bin
Enter: mysqld-max-nt --install
Response: Service successfully installed.
Enter: net start MySql
Console should say: The MySql service is starting.
Console should say: The MySql service was started successfully.

Congratulations you have installed MySQL; however, before we are done here we are going to make MySQL more secure, by adding a password, so only you can change the databases.

At the console window type the following commands (replace new_password with your new password):

Enter: cd c:\mysql\bin
Enter: mysql -u root mysql
Response: Welcome to the MySQL monitor .....
Enter: UPDATE user SET Password=PASSWORD('new_password')
Enter: WHERE user='root';
Response: OK...
Response: OK...
Enter: DELETE FROM user WHERE user='';
Response: OK...
Enter: DELETE FROM user WHERE Host='%';
Response: OK...
Enter: DELETE FROM user WHERE User='';
Response: OK...
Enter: DELETE FROM db WHERE Host='%';
Response: OK...
Enter: exit
Response:  Bye
Enter: exit
Response: Console window closes.

blog comments powered by Disqus

- Programmatically Manipulating Microsoft Exce...
- Installing PHP under Windows
- Compressing Web Content with mod_gzip and mo...
- Compressing Web Output Using mod_deflate and...
- Setting Up Apache 2.0.45 to Parse PHP Pages
- Custom Error 404 Documents with PHP
- Using Apache and PHP on Mac OS X
- ASP: Active Sessions, Active Logins and Tota...
- Working With Oracle on Windows: Part 1
- The Quick-n-Dirty Guide to Setting Up Apache...
- Installing Apache With SSL: The Complete Gui...
- 7 Powerful .htaccess Customization Tips
- Trap And Get Notified: A Practical Solution ...
- One Way To Use Server Side Includes
- Using ForceType For Nicer Page URLs

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials