Difference between revisions of "Bright:mysql"

From Define Wiki
Jump to navigation Jump to search
(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- ...")
 
(No difference)

Latest revision as of 15:16, 1 April 2015

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