Search code examples
mysqlwampbitnami

reset/change mysql root password


How to reset/change mysql root password in bitnami wamp stack?

I trying this solution but this not working for me. In the bitnami folder no have file \bin\mysqld-nt.exe


Solution

  • resolve the problem:

    1. stop service wampstackMySQL (From the Start menu, select Control Panel, then Administrative Tools, then Services)

    1. in windows cmd code:

    E:\Bitnami\wampstack-5.4.34-0\mysql\bin\mysqld.exe --defaults-file=E:\Bitnami\wampstack-5.4.34-0/mysql\my.ini wampstackMySQL --init-file=E:\mysql-init.txt

    mysql-init.txt code:

    UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root'; FLUSH PRIVILEGES;

    2. connect to mysql server via workbench with new root password

    3. restart PC or restart service wampstackMySQL

    4. delete file mysql-init.txt