Reputation: 1044
I got to work on project using Wordpress Bitnami stack. Original developer does not remember password for root user for MySQL database. I tried to follow the steps on Bitnami website. https://docs.bitnami.com/installer/apps/wordpress/administration/change-reset-password/
It seems like everything went throught but I am still not able to access the database using root user.
This is whats inside my mysql-init.txt
ALTER USER 'root'@'localhost' IDENTIFIED BY 'mypass';
Server's response is that this file have been executed but nothing.
I tried to change mysql-init.txt to following
ALTER USER 'root'@'localhost' IDENTIFIED BY 'mypass';
CREATE USER 'admin'@'localhost' IDENTIFIED BY 'mypass';
FLUSH PRIVILEGES;
After this went throught I am able to access the database using Admin user but my root password does not work. That means file have been executed correctly it just does not update my root password for some reason.
Stack is on Win 10 DB:Distrib 5.7.24, for Win32 on AMD64
Command to run DB with init file:
C:\Bitnami\wordpress-4.9.8-2\mysql\bin\mysqld.exe --defaults-file="C:\Bitnami\wordpress-4.9.8-2\mysql\my.ini" --init-file="C:\Bitnami\wordpress-4.9.8-2\mysql\mysql-init.txt" --console
Upvotes: 1
Views: 2285
Reputation: 1044
The problem was in the mysql-init.txt file. Somehow I got a new line at the end of the password.
Very strange issue but hey Its solved.
ALTER USER 'root'@'localhost' IDENTIFIED BY 'mypass[Here was a new line]';
FLUSH PRIVILEGES;
Upvotes: 1