Coral: mysql change password
MySQL - Change password There are three methods of changing the MySQL root password: by a command window, phpMyAdmin or UniController. The easiest method is to use UniController, which is fully automated. The other methods require a certain amount of typing and editing, and are more error-prone. |
|
Set New MySQL root user password using UniController
Change or set a new MySQL root user password.
|
The change process is automatic; the indicators show the actions taken.
Set New MySQL root user password using phpMyAdmin
Setting a new MySQL root password using phpMyAdmin requires four root accounts to be changed along with two configuration files.
Note: The following assumes the current password is root12 and the new password is root123; substitute for these as appropriate.
First start both servers using UniController and then start phpMyAdmin to change the password. Proceed as follows:
|
Note: Do not stop the MySQL server at this point.
Note: Perform a quick test. Clear your browser's cache and restart the servers. Run phpMyAdmin and verify that the MySQL server is accessible. |
Note: The above root user accounts all use the same root password. This is purely for convenience and one of consistency.
Set New MySQL root user password using MySQL Console
Setting a new MySQL root password using MySQL Console requires four root accounts to be changed along with two configuration files.
Note: The following assumes the current password is root123 and the new password is root1234; substitute for these as appropriate.
First start both servers using UniController and then start MySQL Console to change the password. Proceed as follows:
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('root1234'); mysql> SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('root1234'); mysql> SET PASSWORD FOR 'root'@'::1' = PASSWORD('root1234'); mysql> SET PASSWORD FOR 'pma'@'localhost' = PASSWORD('root1234'); mysql> FLUSH PRIVILEGES; mysql> exit; Results for steps 1) and 2) are shown on right.
|
C:\UniServer\usr\local\mysql\bin>mysql -uroot -proot123 mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('root1234'); Query OK, 0 rows affected (0.03 sec) mysql> SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('root1234'); Query OK, 0 rows affected (0.00 sec) mysql> SET PASSWORD FOR 'root'@'::1' = PASSWORD('root1234'); Query OK, 0 rows affected (0.00 sec) mysql> SET PASSWORD FOR 'pma'@'localhost' = PASSWORD('root1234'); Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.06 sec) mysql> exit; Bye C:\UniServer\usr\local\mysql\bin> |
Note: Perform a quick test. Clear your browser's cache and restart the servers. Run phpMyAdmin and verify that the MySQL server is accessible.