In this post we will learn about,how to install mysql server in RedHat and CentOS. MySQL is a relational database management system (RDBMS), and ships with no GUI tools to administer MySQL databases or manage data contained within the databases.
Read More About MySQL Server

Default Port Number of MySQL : 3306 (TCP)

Install the MySQL Server In Red Hat / CentOS

yum install -y mysql-server

How to start/stop/restart the mysql-server

To Start the MySQL server :

 /etc/init.d/mysqld start

To Stop the MySQL Server :

/etc/init.d/mysqld stop

To Restart the MySQL Server :

/etc/init.d/mysqld restart

To Check the status of MySQL Server :

/etc/init.d/mysqld status

How To Check on which port no. the mysql is running

# netstat -tanp|grep mysqld
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 17925/mysqld

The output of netstat command shows the MySQL server is running at port no. 3306 in localhost IP Address(127.0.0.1) ,it is Listening and have the PID no. 17925 with program name mysqld

Read Some More Articles

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.