Wednesday, June 14, 2006
Installing Mysql Server on Red Hat Linux (for the impatient)
I have a red-hat linux 9 server on which I needed to install MySQL 4.1.20. I had already tried using the rpm, and for whatever reason, that just didn't work. So I decided to go with the binary distribution, and boy, it was so much easier!
Here's what I did:
That's it. It was a heck of a lot simpler than I had thought after reading many articles :).
If you read this and are as lucky as I was - it shouldn't take more than 15 minutes to get it up and running!
Here's what I did:
- Downloaded Mysql server archive for RedHat Linux from ftp://mysql.mirror.rafal.ca/pub/mysql/Downloads/MySQL-4.1/mysql-max-4.1.20-pc-linux-gnu-i686.tar.gz
There are of course other mirrors you could download from. - The basic commands that you must execute to install and use a MySQL binary distribution are:shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /PATH/TO/MYSQL-VERSION-OS.tar.gz | tar xvf - shell> ln -s FULL-PATH-TO-MYSQL-VERSION-OS mysql
shell> cd mysql
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql & - If you are upgrading from a 4.1.x version (as I was, from 4.1.11), you could simply replace the
[path/to/mysql]/data
directory with your old data directory and then restart the server.
That's it. It was a heck of a lot simpler than I had thought after reading many articles :).
If you read this and are as lucky as I was - it shouldn't take more than 15 minutes to get it up and running!