Installing MySQL on LinuxUNIX


Installing MySQL on Linux/UNIX

The process of installing MySQL on Linux/UNIX is straight forward, whether youuse RPMs or install the binaries. If you are installing from RPMs, MySQL AB provides platform-specific RPMs such as those for Red Hat, SuSE, and generic Linux running on different processor types such as x86, AMD64, and Intel IA64.

For a minimal installation from RPMs, you will need two files:

  • MySQL-server-type-VERSIONNUMBER.PLATFORM.rpmThe MySQLserver

  • MySQL-client-type-VERSIONNUMBER.PLATFORM.rpmThe standardMySQL client libraries

To performa minimal installation from RPMs, type the following at your prompt:

# rpm -i MySQL-server-VERSION.i386.rpm MySQL-client-VERSION.i386.rpm


By the Way

Replace VERSIONNUMBER in the filename with the actual version you downloaded, and PLATFORM with the short name of the platform you are using. For example, the currentMySQL 5.0 server RPM for SuSE is called MySQL-server-standard-5.0.20-0.sles9.i586.rpm, and the client libraries RPM is called MySQL-client-standard-5.0.20-0.sles9.i586.rpm.


Another painless(and very common) installation method is to install MySQL from a binary distribution. This method requires the gunzip and tar utilities to uncompress and unpack the distribution, and also requires the ability to create groups and users on the system. The first series of commands in the binary distribution installation process has you adding a group and a user and unpacking the distribution, as follows:

# groupadd mysql # useradd -g mysql mysql # cd /usr/local # gunzip < /path/to/mysql-VERSION-PLATFORM.tar.gz | tar xvf 


By the Way

Replace VERSION-PLATFORM in the filename with the actual version you downloaded. For example, the current MySQL 5.0 Linux x86 binary is called mysql-standard-5.0.20-linux-i686-glibc23.tar.gz.


Next, the instructions tell you to create a link with a shorter name:

# ln -s mysql-VERSION-PLATFORM mysql # cd mysql


Once unpacked, the README and INSTALL files will walk you through the remainder of the installation process for the version of MySQL you've chosen. In general, the following series of commands will be used:

# scripts/mysql_install_db --user=mysql # chown -R root  . # chown -R mysql mysql_data # chgrp -R mysql . # bin/mysqld_safe --user=mysql &


You're now ready to start the MySQL server, so skip down to the section called"Basic Security Guidelines" to learn how to add passwords and users. If you had any issues with your installation, check the "Troubleshooting Your Installation" section.




Sams Teach Yourself PHP, MySQL And Apache All in One
Sams Teach Yourself PHP, MySQL and Apache All in One (3rd Edition)
ISBN: 0672328739
EAN: 2147483647
Year: 2004
Pages: 327

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net