CentOS 6.x MySQL simple configuration

I know that there is many information on the internet about how to install and configure MySQL Server, but I want to have that information on my site also. So let’e begin 🙂

First we have to do the install:

# yum install mysql mysql-server

After that we can run:

# mysql_install_db

then we shall give password for user root in mysql. We can do that in two ways, first:

# /usr/bin/mysqladmin -u root -p ‘secretpass’

second ways is to login into mysql

# mysql -u root

and under mysql shell we should do this:

mysql> set password for ‘root’@’localhost’ = password(‘secretpass’);

And voila – we have done a simple MySQL Server configuration.

Now we have to start the mysqld deamon:

# chkconfig –level 2345 mysqld on
# service mysqld start

That’s all.

Leave a Reply

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