Installing MySQL, Apache, PHP, and Perl on Windows Using the XAMPPIntegrated PackageTo install XAMPP on your Windows system, first visit the XAMPP homepage at
http://www.apachefriends.org/en/xampp.html, follow
the link to XAMPP for Windows, and download the installer package. The package will have a name like
xampp-win32-1.5.3a-installer.exe.
Run the installer package once you’ve downloaded it Vista may prompt you to confirm you want to do this. Accept
C:\Program Files as the installation directory and click the
Install button.
XAMPP is installed to the C:\Program Files\xampp directory. Don’t change this unless you really have to. We assume this is the directory you’re using.
After XAMPP is installed, you’ll be prompted to install XAMPP servers as a service;
choose yes. Also select yes when asked whether you want to install Apache as a service and whether you want to autostart the server. If you get a message about port (the web server port)
being blocked on your system, check whether you have another running web server, such as Microsoft IIS; this server could have been installed as part of Visual Studio NET. You can also select yes to install the FileZilla
FTP server as a service, no to autostart the service, no to start the service, and no to uninstall the server.
If your
Windows Firewall is active, you maybe told that Apache has been blocked from accepting incoming network connections. Unless you need to allow connections from other computers, this is a good setting to stick with, so choose to keep blocking the connections.
Figure 2-15. Running the mysqladmin program from the Windows command promptInstalling Under Windows | 59 Finally, select yes when prompted to start the XAMPP control panel. The installation program places a shortcut to the XAMPP control panel on your desktop, but if it’s not there, you can also start it from the XAMPP control panel from the “apachefriends”
submenu of the Windows Start menu. Figure 2-16 shows what the XAMPP control panel looks like. Start the MySQL server by clicking the
Start button next to the MySQLlabel. You need to be logged in as a user with Windows Administrator privileges to control XAMPP, although an unprivileged user is allowed to place files on the web server. Stop any existing MySQL or Apache server before starting XAMPP.
XAMPP does not modify the Windows path. If you need to run any MySQL programs from the command prompt, you’ll need
to run them from the MySQL bin directory.
You can avoid this inconvenience by adding the
C:\Program Files\xampp\mysql\bin directory to your Windows path as discussed in Error Message About MySQL Executable Programs Not Being Found or Recognized later in this chapter.
The first thing you should do once you’ve started the server is to set a password for the database root account. First, open a command window and change to the MySQL
directory:
C:\>
cd C:\Program Files\xampp\mysqlThen run the mysqladmin program from the bin directory:
C:\Program Files\xampp\mysql>
bin\mysqladmin \Share with your friends: