Download the latest and stable version of mysql from http://www.mysql.com/ and run the following commands (make sure that you have the super user privileges and should have necessary compilers available in the system)
# yum install g++ gcc-c++ ncurses-devel wget -y
or
# yum group install "Development Tools"
# cd /usr/local/src/
#wget http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.51.tar.gz/from/http://mysql.he.net/
# tar -zxvf index.html
# cd mysql-5.1.51/
# ./configure --prefix=/usr/local/mysql
# make && make install
# useradd mysql
# chgrp -R mysql /usr/local/mysql/
# cp support-files/my-medium.cnf /etc/my.cnf
# cp support-files/mysql.server /etc/init.d/mysql
# ./scripts/mysql_install_db --user=mysql
# chown mysql.mysql /usr/local/mysql/var/ -R
# chkconfig --add mysql
# chkconfig --list |grep on
# cd support-files/
# cp mysql.server /etc/rc.d/init.d/mysql
# chmod 777 /etc/rc.d/init.d/mysql
# /usr/local/mysql/bin/mysqladmin -u root password
# /etc/rc.d/init.d/mysql start
# /etc/rc.d/init.d/mysql status {For check server is running or not}
# ./bin/mysql_secure_installation
# /etc/rc.d/init.d/mysql restart
# /usr/local/mysql/bin/mysql -u root -p
# yum install g++ gcc-c++ ncurses-devel wget -y
or
# yum group install "Development Tools"
# cd /usr/local/src/
#wget http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.51.tar.gz/from/http://mysql.he.net/
# tar -zxvf index.html
# cd mysql-5.1.51/
# ./configure --prefix=/usr/local/mysql
# make && make install
# useradd mysql
# chgrp -R mysql /usr/local/mysql/
# cp support-files/my-medium.cnf /etc/my.cnf
# cp support-files/mysql.server /etc/init.d/mysql
# ./scripts/mysql_install_db --user=mysql
# chown mysql.mysql /usr/local/mysql/var/ -R
# chkconfig --add mysql
# chkconfig --list |grep on
# cd support-files/
# cp mysql.server /etc/rc.d/init.d/mysql
# chmod 777 /etc/rc.d/init.d/mysql
# /usr/local/mysql/bin/mysqladmin -u root password
# /etc/rc.d/init.d/mysql start
# /etc/rc.d/init.d/mysql status {For check server is running or not}
# ./bin/mysql_secure_installation
# /etc/rc.d/init.d/mysql restart
# /usr/local/mysql/bin/mysql -u root -p
No comments:
Post a Comment