This is a good link that is explaining how to do this
https://aws.amazon.com/premiumsupport/knowledge-center/lightsail-wordpress-fix-database-errors/
Open ssh terminal
vi wp-config.php
Make sure it has the below details
define('WP_ALLOW_REPAIR', true);
define('DB_HOST', '127.0.0.1');
define('DB_NAME','bitnami_
define('DB_USER','user');
define('DB_PASSWORD','
Save it by ESC + wq!
Now run mysite.in/wp-admin/maint/
Or try launching mysite.in/wp-admin
If still does not work, try to connect to the db manually from the terminal by the below command
sudo mysql 'bitnami_wordpress' -h 'localhost' -u 'user' -p
29wbpY4HjUOu
Now if this gives the below error, such as socket error.
In that case, restart the running services in bitnami
sudo /opt/bitnami/ctlscript.sh status
sudo /opt/bitnami/ctlscript.sh restart
sudo /opt/bitnami/ctlscript.sh status
Now if this does not work,
Reboot the server as well from lightsail console.
No comments:
Post a Comment