Installing MySQL on Linux/Unix
#> rpm -i MySQL-server-VERSION.i386.rpm MySQL-client-VERSION.i386.rpm
By the Way
Replace VERSION in the filename with the actual version you downloaded. For example, the current MySQL 4.0 server RPM is called MySQL-server-4.0.21-0.i386.rpm, and the client libraries RPM is called MySQL-client-4.0.21-0.i386.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:
By the Way
Replace VERSION-OS in the filename with the actual version you downloaded. For example, the current MySQL 4.0 Linux/i386 binary is called mysql-max-4.0.21-pclinux-i686.tar.gz.
#> groupadd mysql #> useradd -g mysql mysql #> cd /usr/local #> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
#> ln -s mysql-VERSION-OS 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 #> chown -R root /usr/local/mysql #> chown -R mysql /usr/local/mysql/data #> chgrp -R mysql /usr/local/mysql #> chown -R root /usr/local/mysql/bin
You're now ready to start the MySQL server, so skip down to the section called "Basic Security Guidelines." If you had any issues with your installation, check the "Troubleshooting Your Installation" section.