13.09.2016 Views

PHP and MySQL Web Development 4th Ed-tqw-_darksiderg

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

900 Appendix A Installing <strong>PHP</strong> <strong>and</strong> <strong>MySQL</strong><br />

Unix. Make sure you have the latest operating system service patches applied to the<br />

machine before you begin the Windows installation.<br />

Note<br />

Support for any version of Windows older than Windows 2000 has been dropped in <strong>PHP</strong> 5.3; <strong>PHP</strong> 5.3 only<br />

supports Windows 2000, Windows Server 2003, Windows Server 2008, <strong>and</strong> Windows Vista (<strong>and</strong> beyond).<br />

If you have a slow network connection, you may prefer to use the versions from the<br />

CD, but they are likely to be a version or more out of date.<br />

Installing <strong>MySQL</strong> Under Windows<br />

The following instructions were written using Windows Vista.<br />

Begin by setting up <strong>MySQL</strong>.You can download the Windows Essentials *.msi installation<br />

file from http://www.mysql.com. Double-click this file to begin the installation.<br />

The first few screens of the wizard-style installation process will contain general information<br />

regarding installation <strong>and</strong> the <strong>MySQL</strong> license. Read these screens <strong>and</strong> click the<br />

Continue button to move through them.The first important choice you will encounter is<br />

the installation type—typical, compact, or custom.A typical installation will do the job, so<br />

leave the default item selected <strong>and</strong> click the Next button to continue installing.<br />

When the installation is complete, continue to the <strong>MySQL</strong> Configuration Wizard to<br />

create a custom my.ini file tailored to your particular needs.To continue to the <strong>MySQL</strong><br />

Configuration Wizard, check the Configure <strong>MySQL</strong> Server Now check box <strong>and</strong> click<br />

the Finish button.<br />

Select the appropriate configuration options presented on the several screens in the<br />

<strong>MySQL</strong> Configuration Wizard; consult the <strong>MySQL</strong> Manual at<br />

http://dev.mysql.com/doc/refman/5.0/en/index.html for detailed explanations of these<br />

options.When you have finished your configuration—which includes the addition of a<br />

password for the root user—the wizard will start the <strong>MySQL</strong> service.<br />

After the server has been installed, it can be stopped, started, or set to start automatically<br />

using the Services utility (found in Control Panel).To open Services, click Start <strong>and</strong><br />

then select Control Panel. Double-click Administrative Tools <strong>and</strong> then double-click<br />

Services.<br />

The Services utility is shown in Figure A.4. If you want to set any <strong>MySQL</strong> options,<br />

you must first stop the service <strong>and</strong> then specify them as startup parameters in the Services<br />

utility before restarting the <strong>MySQL</strong> service.The <strong>MySQL</strong> service can be stopped using<br />

the Services utility or using the comm<strong>and</strong>s NET STOP <strong>MySQL</strong> or mysqladmin shutdown.<br />

<strong>MySQL</strong> comes with lots of comm<strong>and</strong>-line utilities. None of them are easy to get at<br />

unless the <strong>MySQL</strong> binary directory is in your PATH.The purpose of this environment<br />

variable is to tell Windows where to look for executable programs.<br />

Many of the common comm<strong>and</strong>s you use at the Windows comm<strong>and</strong> prompt, such as<br />

dir <strong>and</strong> cd, are internal <strong>and</strong> built into cmd.exe. Others, such as format <strong>and</strong> ipconfig,<br />

have their own executables. Having to type C:\WINNT\system32\format would not be<br />

convenient if you wanted to format a disk. Having to type C:\mysql\bin\mysql to run<br />

the <strong>MySQL</strong> monitor also would not be convenient.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!