I am following the guide here: https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-connect-wordpress-to-mysql-managed-database
On step 2.3 it asks me to type in the command:
mysqldump -u root --databases bitnami_wordpress --single-transaction --compress --order-by-primary -p$(cat /home/bitnami/bitnami_application_password) | mysql -u DbUserName --host DbEndpoint --password
(after swapping out the username and endpoint).
When I do this I get the response:
-bash: mysql: command not found -bash: mysqldump: command not found
I found that the mysql and mysqldump commands are not on the path so I looked around and found them in /opt/bitnami/mysql/bin/
/opt/bitnami/mysql/bin/
When I try to run them from there (or cd into that directory) I get:
-bash: /opt/bitnami/mysql/bin/mysql: Permission denied -bash: /opt/bitnami/mysql/bin/mysqldump: Permission denied
I also tried assuming the role of root su root using the password in /home/bitnami/bitnami_application_password but that results in:
su root
/home/bitnami/bitnami_application_password
su: Authentication failure
This took me a while to figure out but I found the answer here: https://docs.bitnami.com/bch/how-to/troubleshoot-permission-issues/ at the bottom of the page. After I ran:
sudo /opt/bitnami/use_wordpress
my bash environment was updated and I was able to run the original commands.
1.4m articles
1.4m replys
5 comments
57.0k users