Xtreme Network Solutions

Archive for January, 2011

How to install MySQL on CentOs

by on Jan.25, 2011, under CentOs

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');

Drop the Any user
DROP USER ''@'localhost';
DROP USER ''@'localhost.localdomain';

Exit MySQL
exit

 

To uninstall Mysql from CentOs.

yum remove mysql-server mysql php-mysql -y

Then remove the mysql folder.
cd /var/lib
rm -rf mysql

Leave a Comment more...





Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!