Changed from MySQL to 5.0.45.
Check whether the installation package exists.
# Yum list MySQL
Install the mysql client
# Yum install MySQL
# Yum list mysql-Server
Install the MySQL server
# Yum install mysql-Server
After the installation, you need to start the MySQL service. You can use either of the following methods:
1. Service mysqld start
2./etc/init. d/mysqld start
After the startup, you need to create a root administrator for MySQL:
# Mysqladmin-u Root Password 123456
Then we can connect to MySQL through the following command line:
# Mysql-u root-P
Enter the password...
Today, I have nothing to do with php.org. I accidentally discovered the restoration method after the root password of the MySQL database is lost and did not dare to exclusive. I hope to help you. 1. End the currently running MySQL process. # Killall mysqld 2. Run in MySQL security mode and skip permission verification. #/Usr/bin/safe_mysqld -- skip-grant-tables 3. log on to MYSQL as the root user. # Mysql-u Root 4. Modify the root user password. Mysql>; use MySQL; Mysql>; update user SET Password = PASSWORD ('pass') where user = 'root '; Query OK, 2 rows affected (0.02 Sec) Rows matched: 2 changed: 2 Warnings: 0 Mysql>; exit 5. End MySQL security mode and run MySql in normal mode. # Killall mysqld # Mysqld 6. Try your new password ...... Try again and again! |