I am not able log in to my WordPress dashboard

0

My website is going down very often and when I reboot the instance it restarts working again but today it is showing a database connection error. Please help to resolve this issue. The front is loading completely but I am not able to log in due to an error establishing a database connection. I don't know what is happening. https://imgur.com/a/KeAcHnd Any help will be appreciated greatly.

2 Answers
0

Hello.

You have tagged Database Migration Service. Is it possible that the database could be RDS or another Lightsail instance? In that case, are the hostname, username, and password set correctly in the configuration file within LightSail? (Is 127.0.0.1 the correct connection destination?)

answered 7 months ago
  • can you please explain more so I can set it accordingly I am not a programmer so I need to w step by step-by-step guide. Thank You for the response.

  • Open the following page: https://lightsail.aws.amazon.com/ls/webapp/home/instances . Click on the ">" button next to the name of your instance. A terminal screen will open. Execute the command: """ cat stack/wordpress/wp-config.php | grep DB """ Does the content displayed match your expectations? (Please avoid sharing the content here.)

    Depending on the content found there, you can execute the following command: """ mysql -u {value of DB_USER} -h {value of DB_HOST} -p """ You will be prompted for a password; enter the value of DB_PASSWORD.

    If you are unable to connect using this method, there is a high possibility that the configuration file contains different information.

  • Daisuke, thank you for your response. I have tried your suggested command but nothing seems unusual, but in the variable values I can not see value in front of the database. It shows "No Default Value". Is it can cause any issues?

  • Excuse me,

    in the variable values I can not see value in front of the database

    Does this mean that you were not able to confirm variable values like the ones below?

    """ define( 'DB_NAME', 'xxxxxxxx' ); define( 'DB_USER', 'xxxxxxx' ); define( 'DB_PASSWORD', 'xxxxxxxx' ); define( 'DB_HOST', 'xxxxxxx:yyyy' ); define( 'DB_CHARSET', 'utf8' ); define( 'DB_COLLATE', '' ); """

  • Yes, I can see those values. Let me share a table shown after the command "mysql -u {value of DB_USER} -h {value of DB_HOST} -p" Variables (--variable-name=value) and boolean options {FALSE|TRUE} Value (after reading options) abort-source-on-error FALSE auto-rehash TRUE auto-vertical-output FALSE binary-as-hex FALSE character-sets-dir (No default value) column-type-info FALSE comments FALSE compress FALSE debug-check FALSE debug-info FALSE database (No default value) 'I wanted to ask for this' default-character-set utf8mb4 delimiter ; vertical FALSE force FALSE named-commands FALSE ignore-spaces FALSE init-command (No default value) local-infile FALSE no-beep FALSE host {value html FALSE xml FALSE line-numbers TRUE unbuffered FALSE column-names TRUE sigint-ignore FALSE port 3306

0

Hello.

Is it possible that the database in Lightsail, such as MySQL, did not start when you restarted the Lightsail instance?
Please make sure that the database is started and that the password, user name, etc. have not been changed.
Since caching is in progress, I think the CDN settings are probably in place, but please try deleting that cache as well.

curl https://imgur.com/a/KeAcHnd -I
HTTP/2 200
last-modified: Fri, 15 Sep 2023 15:27:13 GMT
etag: "2cb94d61d60eee603ebc1d0618964f64"
content-type: text/html
content-security-policy: upgrade-insecure-requests
date: Mon, 02 Oct 2023 14:08:08 GMT
age: 409
x-served-by: cache-bfi-kbfi7400021-BFI
x-cache: HIT
x-cache-hits: 1
x-timer: S1696255689.514953,VS0,VE1
vary: Accept-Encoding
server: cat factory 1.0
strict-transport-security: max-age=300
reporting-endpoints: default="https://chrome-reporting-server-qiu4epv3ia-uc.a.run.app/report"
x-frame-options: DENY
set-cookie: postpagebeta=1; Expires=Mon, 4 Sep 2090 20:00:00 GMT; path=/; domain=.imgur.com;
access-control-allow-origin: https://imgur.com
access-control-allow-credentials: false
cache-control: max-age=60, stale-while-revalidate=600, stale-if-error=86400, public
profile picture
EXPERT
answered 7 months ago
  • Thankful for your response but imgur.com is not my website I just used it to store screenshots Image and share. Yes database is not working and can you let me know how to check the Username and password in the database?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions