11.07.2015 Views

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

SHOW MORE
SHOW LESS
  • No tags were found...

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

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

www.it-ebooks.infoCHAPTER 26 • INSTALLING AND CONFIGURING MYSQL■ Tip Although you’ll learn a few of RPM’s more useful and common commands in this section, it hardlyscratches the surface of its capabilities. If you’re unfamiliar with RPM format, you can learn more aboutit at www.rpm.org.<strong>MySQL</strong> offers RPMs for a variety of different processor architectures. To carry out the examplesfound throughout the remainder of this book, you need to download only the <strong>MySQL</strong>-server and<strong>MySQL</strong>-client packages. Download these packages, saving them to your preferred distributionrepository directory. It’s typical to store packages in the /usr/src directory, but the location has nobearing on the final outcome of the installation process.You can install the <strong>MySQL</strong> server RPM with a single command. For instance, to install the serverRPM targeting 32-bit x86 platforms that was available at the time of this writing, execute the followingcommand:%>rpm -i <strong>MySQL</strong>-server-5.1.49-glibc23.i386.rpmYou might consider adding the –v option to view progress information as the RPM installs. Uponexecution, the installation process will begin. Assuming all goes well, you will be informed that the initialtables have been installed, and that the mysqld server daemon has been started.Keep in mind that this only installs <strong>MySQL</strong>’s server component. If you want to connect to the serverfrom the same machine, you need to install the client RPM:%>rpm -iv <strong>MySQL</strong>-client-VERSION.glibc23.i386.rpmBelieve it or not, by executing this single installation command, the initial databases have also beencreated, and the <strong>MySQL</strong> server daemon is running.■ Tip Uninstalling <strong>MySQL</strong> is as easy as installing it, involving only a single command:%>rpm –e <strong>MySQL</strong>-VERSIONAlthough the <strong>MySQL</strong> RPMs offer a painless and effective means to an end, this convenience comesat the cost of flexibility. For example, the installation directory is not relocatable; that is, you are boundto the predefined installation path as determined by the packager. This is not necessarily a bad thing,but the flexibility is often nice, and sometimes necessary. If your personal situation requires that addedflexibility, read on to find out about the binary and source installation processes. Otherwise, proceed tothe “Setting the <strong>MySQL</strong> Administrator Password” section.The Binary Installation ProcessA binary distribution is simply precompiled source code, typically created by developers or contributorswith the intention of offering users a platform-specific optimized distribution. Although this chapter489

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

Saved successfully!

Ooh no, something went wrong!