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

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts


Installing and Configuring ProFTPD Server in Ubuntu/Debian

1) Install proftpd using apt-get command $ sudo apt-get update$ sudo apt-get upgrade $ sudo apt-get install proftpd 2) Add this line in /etc/shells file : /bin/false 3) Create a /home/FTP-shared directory : cd /homesudo Read more…


SQL_CALC_FOUND_ROWS : Get total records even if limit clause in QUERY

Problem Statement:- There are many situation when we want to restrict the records that a query returns, but we want the total records that query had matched.Like, If we use LIMIT clause in the query Read more…

Apache Ant

Apache Ant : Install Apache Ant on Linux Machine

Apache Ant is a Java library and command-line tool to automate the repetitive tasks and helps to build software. Ant is flexible and does not impose coding conventions. It supplies a number of built-in tasks allowing Read more…