MySQL Database Installation and Configuration

We can do installation of MySQL two ways:

a) Install MySQL package using RHN

b) Install MySQL rpm from CD/DVD

Type the following command as root user:
# yum install mysql-server mysql     (This command for Fedora core and Cent OS Linux)

Type the following command as root user:
# up2date mysql-server mysql           (If the package is not updated)

Start MySQL Service

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

or

#service mysqld start

Setup mysql root password

Type the following command to setup a password for root user:

# mysqladmin -u root password NEWPASSWORD

If you want to change root password, then you need to use the command:
# mysqladmin -u root -p’oldpassword’ password newpass

Example:- If the old password is xyz, you can set the new password to 123, enter:

# mysqladmin -u root -p’xyz’ password ‘123’

Change MySQL password for other users

Test mysql connectivity

Type the following command to connect to MySQL server:
$ mysql -u root -p

 

 

Happy To Help You ….
All Linux Solution & Training.
Genowin Technologies(www.genowin.com)

Leave a Reply

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