Bright:mysql

From Define Wiki
Jump to navigation Jump to search

MySQL

Please note that you can reset the MySQL root password by the following procedure:

1- Stop the services.

# service cmd stop
# service mysql stop

2- Start MySQL in safe mode.

# mysqld_safe --skip-grant-tables &
# mysql -u root

3- Change the password

mysql> use mysql;
mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where
User='root'; flush privileges;
quit

Replace the string NEW-ROOT-PASSWORD inside the double quotes with your new password.

4- Restart the services.

# service mysqld stop
# service mysqld start
# service cmd start