Bright:mysql

From Define Wiki
Revision as of 15:16, 1 April 2015 by Chenhui (talk | contribs) (Created page with "= MySQL = Please note that you can reset the MySQL root password by the following procedure: 1- Stop the services. <syntaxhighlight> # service cmd stop # service mysql stop </syntaxhighlight> 2- ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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