Installing CentOS in MySQL
The below steps will help to install Mysql using YUM command.
Step 1: Open the terminal window
Step 2: Login as a super user.
Step 3: Execute Below command.
yum install mysql-server mysql php-mysql
How to Stop, Start, Restart MySQL
To Start mysql: service mysqld start
To Stop MySQL: service mysqld stop
To Restart MySQL:service mysqld restart
After complete the installation use the below steps to configure the Mysql.
To Login to MySQL: mysql -u root
To set root password
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');
To Delete or Drop User from Mysql
DROP USER ''@'localhost';
DROP USER ''@'localhost.localdomain';
