Given a new Linux Installation, the following is my recommendation for installation of MySQL for a experienced software developer giving flexibility in a development environment.
-
Under normal circumstances, most distros include MySQL either in a default server installation or on the distribution CD’s. You should first ensure MySQL is not installed.
-
All products can be downloaded from the MySQL Downloads page.
-
Download MySQL 5.1 Beta – Linux (non RPM, Intel C/C++ compiled, glibc-2.3), this product is close to production release and stable. This also includes both Server and Client as well as provides flexibility in installation location and multiple installations.
-
Download MySQL Administrator 1.1.6.
-
Download MySQL Query Browser 1.1.18.
-
Download MySQL 5.1 Manual
Installation
su - groupadd mysql useradd -g mysql mysql cd /opt tar xvfz mysql-5.1.7-beta-linux-i686-icc-glibc23.tar.gz ln -s mysql-5.1.7-beta-linux-i686-icc-glibc23 mysql tar xvfz mysql-administrator-1.1.6-linux-i386.tar.gz tar xvfz mysql-query-browser-1.1.18-linux-i386.tar.gz tar xvfz refman-5.1-en.html-chapter.tar.gz mv html-chapter mysql-manual-5.1 cd mysql echo "[mysqld] user=mysql basedir=/opt/mysql datadir=/opt/mysql/data port=3306" > my.cnf scripts/mysql_install_db cd /opt chown -R root /opt/mysql chown -R mysql /opt/mysql/data chgrp -R mysql /opt/mysql chown -R root /opt/mysql/bin cd /opt/mysql ./bin/mysqld_safe & ./bin/mysqladmin -u root password 'new-password' ./bin/mysqladmin -u root -h `hostname` -pnew-password password 'new-password' ./bin/mysqladmin -pnew-password shutdown echo "PATH=/opt/mysql/bin:/opt/mysql-administrator/bin:/opt/mysql-query-browser/bin:$PATH; export PATH" > /etc/profile.d/mysql.sh . /etc/profile.d/mysql.sh # Just for this session cp support-files/mysql.server /etc/rc.d/init.d chkconfig mysql.server on
Operation
The MySQL server will start automatically on System boot
To run the MySQL Client
mysql -uroot -pnew-password mysql
To run the MySQL Administrator
mysql-administrator
To run the MySQL Query Browser
mysql-query-browser
Now that I remember all this, perhaps RPM’s are the way to go, I just don’t like the structure in deployed files.