How to Install MySQL on Linux

I will explain how to install MySQL on Linux [Redhat, Fedora] platform.

Type the following command as root user:
# yum install mysql-server mysql

Start MySQL Service:-
To start mysql server type the following command:-
# chkconfig mysqld on
# /etc/init.d/mysqld start

 Setup mysql root password:-
# mysqladmin -u root password yourpass

Connecting to MySQL:-
# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7369

Thanls,
Vishal Vyas

Comments

  1. which Port to allow in Iptable rules?

    ReplyDelete
  2. Hi,

    MySQL is open source database server and by default it listen on TCP port 3306.

    iptables -A INPUT -i eth0 -p tcp -m tcp --dport 3306 -j ACCEPT

    Thanks,
    Vishal

    ReplyDelete

Post a Comment