Search This Blog

Installing MySQL on Linux/Unix

Installing MySQL on Linux/Unix
The recommended way to install MySQL on a Linux system is via RPM. MySQL AB makes the following RPMs available for download on its web site:
MySQL - The MySQL database server, which manages databases and tables, controls user access, and processes SQL queries.
MySQL-client - MySQL client programs, which makes it possible to connect to, and interact with, the server.
MySQL-devel - Libraries and header files that come in handy when compiling other programs that use MySQL.
MySQL-shared - Shared libraries for the MySQL client
MySQL-bench - Benchmark and performance testing tools for the MySQL database server.
The MySQL RPMs listed here are all built on a SuSE Linux system, but they.ll usually work on other Linux variants with no difficulty.
Now follow the following steps to proceed for installation:
Login to the system using root user.
Switch to the directory containing the RPMs:
Install the MySQL database server by executing the following command. Remember to replace the filename in italics with the file name of your RPM.
[root@host]# rpm -i MySQL-5.0.9-0.i386.rpm
Above command takes care of installing MySQL server, creating a user of MySQL, creating necessary configuration and starting MySQL server automatically.
You can find all the MySQL related binaries in /usr/bin and /usr/sbin. All the tables and databases will be created in /var/lib/mysql directory.
This is optional but recommended step to install the remaining RPMs in the same manner:
[root@host]# rpm -i MySQL-client-5.0.9-0.i386.rpm
[root@host]# rpm -i MySQL-devel-5.0.9-0.i386.rpm
[root@host]# rpm -i MySQL-shared-5.0.9-0.i386.rpm
[root@host]# rpm -i MySQL-bench-5.0.9-0.i386.rpm