mysql 默认密码为安装时设置的系统应用密码
How to reset the MySQL root password on Windows?
If you don't remember your MySQL root password on Windows, you can follow the steps below to reset it to a new value:
Assuming your BitNami stack is located in the C:\Bitnami directory and that you have opened theBitnami Console
, create a file in C:\Bitnami\mysql-init.txt with the content shown below (replace mynewpassword string with the one you want):
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('mynewpassword');
Stop the MySQL server using theManager Tool
.
Start MySQL with the following command into the Bitnami Console to set the new password:
mysql\bin\mysqld --defaults-file=mysql\my.ini --init-file=C:\Bitnami\mysql-init.txt --console
Press Ctrl-c when the process finished showing the MySQLversion to kill the process. For example:
Version: '5.5.42' socket: '' port: 3306 MySQL Community Server (GPL)
Start the MySQL server again using the Bitnami Manager Tool and delete the mysql-init script.