简体   繁体   中英

AWS Lightsail Wordpress Managed MySQL Database mysqldump command not found

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/

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: 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM