Install mysql server in Centos 5


To install mysql server in Centos 5 use following command:

$ yum install mysql mysql-server

After installing mysql server you need to set password for mysql root user with following command:

$ mysqladmin -u root password 'new-password'

Now try to access mysql with following command:

$ mysql -u root -p'new-password'

It will take you to myslq console.

To restart mysql server use following command:

$ service mysqld restart

To stop mysql server:

$ service mysqld stop

To start mysql server:

$ service mysqld start

To get status of mysql server:

$ service mysqld status



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s