Sunday, March 11, 2012

Install Mysql

Now I let you know how to install MySQl on linux

First this will check if mysql is already installed on linux
# rpm -qa | grep mysql

Remove previouse Versin
# rpm -e  mysql-devel-5.0.77-4.el5_5.4 –-nodeps(--nodeps will ignore dependencies)

And go to web site to find the version that you want to install


# rpm -ivh Mysql-server....rpm
# rpm -ivh Mysql-share.....rpm
# rpm -ivh mysql-devel......rpm
# rpm -ivh mysql-client......rpm

A) If you are /using mysql on RedHat Linux (Fedora Core/Cent OS) then use following command:

* To start mysql server:
/etc/init.d/mysqld start
* To stop mysql server:
/etc/init.d/mysqld stop
* To restart mysql server
 /etc/init.d/mysqld restart
# service mysqld start
# service mysqld stop
# service mysqld restart
$ mysql -u root -p
Enter password:

mysql> use mysql

mysql> GRANT ALL ON *.* to root@'192.168.1.4' IDENTIFIED BY 'your-root-password'; 

mysql> FLUSH PRIVILEGES;
and /etc/sysconfig vi iptables and add open 3306 port

No comments:

Post a Comment