|
Installation of MySQL using Binaries
Eventhough rpm are available for the installtion of Mysql 5.0 for RedHat linux.It is difficult to enter the rpms hell to search for the dependencies.Here is an easy steps to install Mysql 5.0 using the binaries
Download the binary file from the Mysql website. This will be in the mysql *.linux.i686.tar.gz format.Then save the downloaded file in the /usr/local directory
and then follow the commands step by step
log in as root
#groupadd mysql
to make a group called mysql
then add a user named mysql
#useradd -g mysql mysql
Now change to the directory where the binary files are stored
#cd /usr/local
unzip the downloaded binary files
#tar zxfv mysql*.tar.gz
You can make a softlink for the extracted directory to mysql
# ln -s /usr/local/mysql* mysql
change the directory into mysql
and then give the command
# scripts/mysql_install_db –user=mysql
user mysql should have permission to write in the /usr/local directory
Now mysql is installed in your system.
To start the server
then make root as the owner for the file
#chown -R root .
Then make user mysql as the owner of the data folder
#chown -R mysql data
Then change the group into mysql
#chgrp -R mysql . . refers to the parent directory
then issue the command
#bin/mysql_safe –user =mysql &
Now you are with the Mysql5.0
To start and stop the server
copy the file mysql.server from the supportfiles directory to the /etc/init.d and make it as executable.Then make a soft link in the /etc/rc5.d and /etc/rc3.d
# ln -s /etc/init.d /mysql.server /etc/rc5.d/S70mysql.server
After installing the script the commands needed to activate on linux.we can use chkconfig for that
#chkconfig –add mysql.server
then
#chkconfig –level 345 mysql.server on
|