Coral: mysql restore password
MySQL - Restore password
There are two methods for restoring the MySQL root password: by a command window or UniController. The better method is to use UniController which is fully automated. The other method requires running two command windows and a certain amount of typing and editing.
Restore MySQL root user password using UniController
Restore MySQL root user password
The restore process is automatic; the indicators show the actions taken.
Restore MySQL root user password using command window
To restore the MySQL root user password, the MySQL server requires restarting with "skip grant tables" option set. This bypasses any security, allowing access to the server. A new password is set and the grant tables updated. The following method uses two command windows and task manger.
Kill MySQL process
If the MySQL server is running, the process must first be stopped. Open windows task manager by pressing ctrl, alt and del keys together. In the window that opens, click on the Process tab (default); scroll up or down and locate the file mysqld1.exe. Right click on this and select End Process; click Yes to confirm kill process.
Note: If you have run multi-servers, the process name will differ. For example, mysqldX.exe, where X is a digit. Kill this process
Restart MySQL server skip grant
The MySQL server requires restarting from a command window with "skip grant tables" option set as follows:
Note: The path you installed The Uniform Server may be different; substitute your path as appropriate.
The dialogue in the command window looks similar to this:<r />
C:\Documents and Settings\mike>cd \ C:\> cd C:\UniServer\usr\local\mysql\bin C:\UniServer\usr\local\mysql\bin>mysqld1 --skip-grant-tables --user=root _
Set Password and Update grant tables
Start a second command window to set a new password (root) and update grant tables as follows:
The dialogue in the command window looks similar to that on the right.
Note: All three user root accounts have their passwords changed.
Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\mike>cd \ C:\>cd C:\UniServer\usr\local\mysql\bin C:\UniServer\usr\local\mysql\bin>mysql mysql> USE mysql; Database changed mysql> UPDATE user SET password=password("root") WHERE user="root"; Query OK, 3 rows affected (0.50 sec) Rows matched: 3 Changed: 3 Warnings: 0 mysql> UPDATE user SET password=password("root") WHERE user="pma"; Query OK, 3 rows affected (0.50 sec) Rows matched: 3 Changed: 3 Warnings: 0 mysql> flush privileges; Query OK, 0 rows affected (0.86 sec) mysql> exit; Bye C:\UniServer\usr\local\mysql\bin>
Kill process and restart
- Kill the process mysqld1 (see the section above)
- Close both command windows.
- Edit the file UniServer\uni_con\includes\mysql_password and replace the existing password with the new root password root.
- Edit the file UniServer\uni_con\config_tracker.ini
- Navigate to section: [MYSQL]
- Change line password = xxx by replacing the existing password xxx with the new root password root.
- Start the servers using UniController
- Run phpMyAdmin. If the phpMyAdmin page is displayed, it confirms the update was successful.