CentOS6.5 installation and configuration of Mysql database (transfer)

1. Uninstall the original mysql
quote
rpm -qa | grep mysql

2. Uninstall through the rpm -e command or the rpm -e --nodeps command
quote
rpm -e mysql // Ordinary deletion mode
rpm -e --nodeps mysql // Force deletion mode, if you use the above command to delete other files that are dependent on it, you can use this command to delete them forcibly

3. Install mysql through yum
quote
yum install -y mysql-server mysql mysql-deve

4. Check the version of mysql-server just installed
quote
rpm -qi mysql-server

Five, mysql database initialization and related configuration
quote
service mysqld start

To set boot up:
quote
chkconfig mysqld on

Set root password:
quote
mysqladmin -u root password 'root' // Use this command to set the password for the root account to root

OK, you can log in!
quote
mysql -u root -p

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326873878&siteId=291194637