Install MySQL Server (Binaries & RPMs)
Note: At the time of this writing, the current version of MySQL is 5.0.27. I am still using the 4.1.x train of MySQL releases, however, although the 5.0.x releases should work just fine. It is also possible to use the latest 3.23 or 4.0 version as well. I prefer using the latest and greatest, but some of the software I'm currently using doesn't yet work with 5.0.x.
- RPM Install
An RPM installation of MySQL is fairly straightforward. Install these RPM's just like you install any other RPM. You'll need to install the following packages:
- MySQL-server
- MySQL-cient
- MySQL-shared-compat
- MySQL-devel
rootshell> rpm -ivh MySQL-server-4.1.22-0.i386.rpm
rootshell> rpm -ivh MySQL-client-4.1.22-0.i386.rpm
rootshell> rpm -ivh MySQL-shared-compat-4.1.22-0.i386.rpm
rootshell> rpm -ivh MySQL-devel-4.1.22-0.i386.rpm
- Binary Install
Note : This information was copied directly from the MySQL Manual. Current information can be found there.
The basic commands you must execute to install and use a MySQL binary distribution are:
rootshell> groupadd mysql
rootshell> useradd -g mysql mysql
rootshell> cd /usr/local
rootshell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz
rootshell> ln -s full-path-to-mysql-VERSION-OS mysql
rootshell> cd mysql
rootshell> scripts/mysql_install_db --user=mysql
rootshell> chown -R root .
rootshell> chown -R mysql data
rootshell> chgrp -R mysql .
rootshell> bin/mysqld_safe --user=mysql &
For versions of MySQL older than 4.0, substitute bin/safe_mysqld for bin/mysqld_safe in the final command.
- Source Install - Don't do this. Source installs of MySQL are not recommended. Not even by the developer.