Wordpress instance cloning with a snapshot, database connection error. What to do?

0

I have a wordpress instance here on AWS Lightsail that works fine.

(I don't understand where to find the database, if I go to the instance menu under database, it is not present, yet the site works well :-) so it's there somewhere).

I can open the wp-config.php file from ftp and see that the first two data are:

define( 'DB_NAME', 'bitnami_wordpress' ); define( 'DB_USER', 'bn_wordpress' );

Having said that, I created a snapshot of this instance and inserted it in the same AWS Region but in another zone (Zone B)


If I try to connect to the new IP address I get the error: Error establishing a database connection I inspect and see that it is an error coming from wp:

<body id="error-page"> <div class="wp-die-message"><h1>Error establishing database connection</h1></div>...etc..

If I open the new instance via FTP and open the wp-config.php I notice that it is the same as the original instance with the same data.


There are 2 questions, How can I access the database of the original instance, How should I configure the new instance to fix the error?

PS:

I created the new instance to have a clone of my wordpress but it must also have a new database.

I want them to be completely independent.

Thanks for any help

질문됨 7달 전175회 조회
1개 답변
0

Hello,

Sorry to see you're encountering this issue.

Instance created from snapshot of the Lightsail wordpress Instance should be clone of the original Lightsail wordpress Instance. If the Database of the wordpress is configured to point to the Local database in the instance, then both of the Instance(original and clone) should be independent of each other.

Answer for the error message is below.

This error likely means either the username/password combination for Wordpress connecting to the database set in wp-config.php is incorrect, or the database isn't running. Here are a few things I'd try:

  1. See if the database is running. You can use the command ps aux | grep mysql to see if there's a mysql process running.
  2. Check your wp-config.php file to ensure that the database credentials set there are correct.
  3. Check the instance's disk space (df -h) to ensure it's not full.

I hope those steps help you figure out the issue. Thank you for using Amazon Lightsail!

Thanks, Naveen

AWS
지원 엔지니어
답변함 7달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠