R-Ts NetWorks

Server the Best

How to Install MySql on CentOS server


How to install MySql on CentOS server

Please check whether MySql packages are available under yum.

yum list mysql*

If yes, then install mysql using below command.

yum install mysql*

Now install the Mysql database on the server using below command.

mysql_install_db

It will create mysql database on mysql server.  Now, we have to reset the password for the Mysql server root user. Please use below command.

/usr/bin/mysqladmin -u root password ‘new-password’

Replace the ‘new-password’ with the password you would like to set.

Now, create my.cnf under root home directory using below command.

vi /root/.my.cnf

Now, insert the below lines in .my.cnf file

[client]

user=”root”

password=”new-password”

Please replace the “new-password” with the password you have used above while setting up  with the mysqladmin command.

Your Mysql server is now installed and configured on your machine. You can check the same using below command.

mysql

Try start Mysql service using the below command:

service mysql start

 

Advertisements

May 7, 2012 - Posted by | Installation, MySql | , ,

No comments yet.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: