Monday, 4 June 2012

Install and Configure MySQL on CentOS

Install and Configure MySQL on CentOS

MySQL

MySQL is a Relational Database Management System (RDBMS) that runs as a server providing multi-user access to a number of databases.  For more information on MySQL, you can visit their website at www.mysql.com.

Version

This documentation was written for MySQL 5.0.45 but may be usefull with other versions.

How to install MySQL

Install MySQL

yum install mysql-server mysql php-mysql

How to configure MySQL

Set the MySQL service to start on boot

chkconfig --levels 235 mysqld on


Start the MySQL service
  
service mysqld start


Log into MySQL

 mysql -u root


Set the root user password for all local domains

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('new-password');
SET PASSWORD FOR 'root'@'localhost.localdomain' = PASSWORD('new-password');
SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('new-password');


Exit MySQL
exit






No comments :

Post a Comment