Difficulty Resetting MySQL root Password

Keywords: MySQL - AWS - Technical issue - Credentials
I’ve attempted to follow the instructions at https://docs.bitnami.com/aws/apps/wordpress-pro/administration/change-reset-password/ for resetting the MySQL root password. However, when I get to the step asking me to run the following command:

sudo /opt/bitnami/mysql/bin/mysqld_safe --pid-file=/opt/bitnami/mysql/data/mysqld.pid --datadir=/opt/bitnami/mysql/data --init-file=/tmp/mysql-init --lower_case_table_names=1 2> /dev/null &

The console seems to hang. It’s been running for about an hour now with no change. The output that I get is shown below.

[1] 1896
bitnami@ip-172-31-18-193:~$ 2021-05-11T14:26:51.154415Z mysqld_safe Logging to '/opt/bitnami/mysql/data/ip-172-31-18-193.err'.
2021-05-11T14:26:51.173344Z mysqld_safe Starting mysqld daemon with databases from /opt/bitnami/mysql/data

I’m running a Bitnami WordPress Multisite Stack, Version 5.7.1-0.

Hello @robert,

Thanks for using Bitnami! I have tried this and the shell used to connect to the database is kept open as you say. You just need to end the command (ctrl+c) and restart the MySQL service as the guide says, that would output the following:

$ sudo /opt/bitnami/ctlscript.sh restart mysql
Unmonitored mysql
2021-05-12T10:46:32.956321Z mysqld_safe mysqld from pid file /opt/bitnami/mysql/data/mysqld.pid ended
/opt/bitnami/mysql/scripts/ctl.sh : mysql stopped
/opt/bitnami/mysql/scripts/ctl.sh : mysql  started at port 3306
Monitored mysql
[1]+  Done                    sudo /opt/bitnami/mysql/bin/mysqld_safe --pid-file=/opt/bitnami/mysql/data/mysqld.pid --datadir=/opt/bitnami/mysql/data --init-file=/tmp/mysql-init --lower_case_table_names=1 2> /dev/null

You can check that the new password is valid connecting to the DB with the MySQL client:

$ sudo mysql -h localhost -u root -p

Do not forget to remove the mysql-init script after finishing.

Francisco de Paz

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.