Thursday 12 September 2013

Mysql-Installation-With TAR



Mysql-Installation-With TAR


First Lets Verify dependacy exit

yum install gcc-c++ ncurses-devel gcc zlib zlib-devel


Installation


Download mysql-version-os.tar.gz
groupadd mysql
useradd -g mysql mysql
tar -zxvf mysql-5.1.24-rc.tar.gz
cd mysql-5.1.24-rc
./configure --prefix=/opt/mysql
make
make install
cp support-files/my-medium.cnf /etc/my.cnf          
cp support-files/mysql.server /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
chkconfig --add mysqld
cd /opt/mysql/
chown -R mysql  .
chgrp -R mysql  .


cp /etc/my.cnf   /etc/my.cnf.org
Note : Take a backup of my.cnf original file

Make changes in /etc/my.cnf if required
Note : This step is not necessary
but some configuration  changes you cant make after mysql is restarted


ex:  innodb_log_file_size = 512M  ,  innodb_log_buffer_size = 8M

default-storage_engine=innodb
basedir=/opt/mysql/
datadir=/opt/mysql/data/


bin/mysql_install_db --user=mysql
Note : This step install mysql SYSTEM TABLES


chown -R mysql  .
chgrp -R mysql  .
bin/mysqld_safe --user=mysql &

Note : This Step is to start mysql server first time  


service mysqld stop
service mysqld start

Set root password  (Since first time root dont have any password)
mysqladmin -u root password passwd

No comments:

Post a Comment