Go to http://www.mysql.com/ and download the mysql package
- to install this directly on the command line type:
- cd /usr/local
- wget http://mirror.trouble-free.net/mysql_mirror/Downloads/MySQL-4.0/mysql-4.0.27.tar.gz
# http://mirror.trouble-free.net/mysql_mirror/Downloads/MySQL-5.0/mysql-5.0.41.tar.gz
- gunzip mysql-4.0.27.tar.gz
- tar xvf mysql-4.0.27.tar
- cd mysql-4.0.27
- groupadd mysql
- useradd -g mysql mysql
- ./configure --prefix=/usr/local/mysql --enable-large-files --enable-shared=yes --with-readline
**** If only MySQL client is needed for DBD::mysql then use this:
- ./configure --prefix=/usr/local/mysql --without-server --enable-shared=yes --with-readline
**** If using version 5 tree MySQL client then use this:
- ./configure --prefix=/usr/local/mysql --without-server --enable-shared=yes --with-readline --enable-thread-safe-client
- make
- make install
- scripts/mysql_install_db
- chown -R root /usr/local/mysql
- chown -R mysql /usr/local/mysql/var
- chgrp -R mysql /usr/local/mysql
- cp support-files/my-medium.cnf /etc/my.cnf
- /usr/local/mysql/bin/mysqld_safe --user=mysql &
- ln -s /tmp/mysql.sock /var/run/mysql/mysql.sock
After installing and running MySQL, type mysql and hit enter you'll be in mysql shell where you can type queries.
Good luck!