Installing MySQL on Windows

The MySQL installation process on Windows is also quite simplethe developers from MySQL AB have packaged up everything you need in one zip file with a setup program! Download the zip file, extract its contents into a temporary directory, and run the setup.exe application. After the setup.exe application installs the MySQL server and client programs, you're ready to start the MySQL server.

The following steps detail the installation of MySQL 4.0.x on Windows, when the installer is downloaded from MySQL AB. The install sequence looks similar, regardless if you have a Windows 98, Windows NT, Windows 2000, or Windows XP environment for testing and development. Many users install MySQL on personal Windows machines just to get a feel for working with the database before deploying MySQL in a production environment.

By the Way

If you have the tools and skills to compile your own Windows binary files, the Cygwin source code is also available from MySQL AB. Follow the instructions contained in the source distribution to build your own executable files.

Jumping right into the installation sequence, assuming you have downloaded the Windows installer from the MySQL AB Web site, follow these steps:


Extract the contents of the zip file into a temporary directory and find the setup.exe file, and then double-click it to start the installation. You will see the first screen of the installation wizard, as shown in Figure 2.6. Click Next to continue.

Figure 2.6. The first step of the MySQL installation wizard.


The second screen in the installation process contains information regarding the installation location (see Figure 2.7). The default installation location is C:\mysql. If you plan to install MySQL in a different location, this screen shows you a few changes that you will have to make on your own. The information on this screen is also important for Windows NT users who want to start MySQL as a service. Read the information and note anything relevant to your situation, and then click Next to continue.

Figure 2.7. Step 2 of the MySQL installation wizard. Note any relevant information before continuing.


The third screen in the installation process has you select the installation or destination location (see Figure 2.8). If you want to install MySQL in the default location, click Next to continue. Otherwise, click Browse and navigate to the location of your choice, and then click Next to continue.

Figure 2.8. Step 3 of the MySQL installation wizard. Select an installation location.


The fourth screen asks you to select the installation methodTypical, Compact, or Custom (see Figure 2.9). The Custom option allows you to select elements of MySQL to install, such as documentation and help files. Select Typical as the installation method, and click Next to continue.

Figure 2.9. Step 4 of the MySQL installation wizard. Select an installation type.


The installation process will now take over and install files in their proper locations. When the process is finished, you will see a confirmation of completion, as in Figure 2.10. Click Finish to complete the setup process.

Figure 2.10. MySQL has been installed.

There are no fancy shortcuts installed in your Windows Start menu after an installation of MySQL from MySQL AB, so now you must start the process yourself. If you navigate to the MySQL applications directory (usually C:\mysql\bin\ unless you changed your installation path), you will find numerous applications ready for action (see Figure 2.11).

Figure 2.11. A directory listing of MySQL applications.

The winmysqladmin.exe application is a great friend to Windows users who are just getting started with MySQL. If you double-click this file, it will start the MySQL server and place a stoplight icon in your taskbar.

When the interface launches, you will see an application that provides an easy way to maintain and monitor your new server (see Figure 2.12).

Figure 2.12. WinMySQLadmin started and ready for action.

WinMySQLadmin will automatically interpret environment information, such as IP address and machine name. The tabs across the top allow you to view system information and edit MySQL configuration options.

For example, if you select the Variables tab, as shown in Figure 2.13, you can also view server configuration information. This information is similar to the output of the MySQL SHOW VARIABLES command.

Figure 2.13. Server configuration information.

To shut down the MySQL server and/or the WinMySQLadmin tool, right-click again on the stoplight icon in your taskbar and select the appropriate option (stop or start). As long as the MySQL server is running, you can run additional applications through a console window, such as the MySQL monitor.

Sams Teach Yourself PHP MySQL and Apache All in One
Sams Teach Yourself PHP, MySQL and Apache All in One (4th Edition)
ISBN: 067232976X
EAN: 2147483647
Year: 2003
Pages: 333
Authors: Julie Meloni

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: