In the previous post we have seen how we can install java on the linux machine. This post will guide you how to install MySQL on linux machine using yum command.

Install MySQL

1) To install mysql server type the following yum command:

# yum install mysql-server mysql

2) Turn on mysql service, type the following chkconfig command

# chkconfig mysqld on

3) Start/Stop/Restart using one of the command

# service mysqld start
# service mysqld restart
# service mysqld stop

4) Set root user password

# mysqladmin -u root password NEWPASSWORD

5) Edit /etc/sysconfig/iptables to Add firewall rule

# vi /etc/sysconfig/iptables

6) Add line  

-A INPUT -m state --state NEW,ESTABLISHED -m tcp -p tcp --dport 3306 -j ACCEPT

7) Save and close by pressing Esc and :wq and hit enter

8) Restart iptable service

# service iptables restart

9) Done

Back << Install Java on Linux Machine                 Next >> Install JBoss on Linux Machine

Categories: LinuxMySQL