Search This Blog

Jan 26, 2010

Installation of MYSQL on Linux

1.)Download mysql-5.0.51a-linux-i686-glibc23.tar.gz from anywhere.
---------
2.)Next, let’s create the mysql user and group:
---------
#groupadd mysql
#useradd -g mysql mysql

3.)And continue with the actual installation:
---------
#cd /usr/local
#gunzip < /usr/local/src/mysql-5.0.51a-linux-i686-glibc23.tar.gz | tar xvf -
#ln -s mysql-5.0.51a-linux-i686-glibc23 mysql
#cd /mysql/
#scripts/mysql_install_db --user=mysql
#chown -R root .
#chown -R mysql data
#chgrp -R mysql .
#########################################################
The mysqld binary will search for configuration file under: /etc/my.cnf, /my.cnf and /my.cnf . You can start with one of the supplied configs (my-small.cnf, my-medium.cnf, my-large.cnf, my-huge.cnf or my-innodb-heavy-4G.cnf) and customize it accordingly to your needs. I chosen to put this one under /usr/local/mysql, so I can have more mysql instances running, each with its local my.cnf:
#########################################################
#cp support-files/my-medium.cnf my.cnf
#vim my.cnf
4.)Once you are happy with the config you can start mysql manually using:
#bin/mysqld_safe --user=mysql &

5.)You can stop it manually with:

/usr/local/mysql/bin/mysqladmin shutdown

6.)Start MySql >>>>>>>>>>>>>
/usr/local/mysql/bin/mysql
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

No comments:

Post a Comment