How to fix "error establishing a database connection" in wordpress

Following Google App Engine"s instructions for creating a local WordPress development platsize, I created the database & initial user using the instruction"s MySQL direction:

CREATE DATABASE IF NOT EXISTS wordpress_db;CREATE USER "wp_user"
"localhost";After running it without errors reported, MySquốc lộ subsequently reported back:

CREATE DATABASE IF NOT EXISTS wordpress_db;# 1 row affected.CREATE USER "wp_user"
"localhost" IDENTIFIED BY "wp_password";# MySquốc lộ returned an empty result phối (i.e. zero rows).GRANT ALL PRIVILEGES ON wordpress_db.* TO "wp_user"
"localhost";# MySQL returned an empty result phối (i.e. zero rows).While the commvà line runs dev_apphệ thống.py, I try reaching the WordPress ứng dụng & get instead:

Error establishing a database connection

I"ve sầu removed và recreated the database (wordpress_db) & user (wp_user) without reaching the WP tiện ích.

Bạn đang xem: How to fix "error establishing a database connection" in wordpress

Any suggestion how to lớn resolve sầu this is appreciated.

Thanks, this is my App Engine log:


wordpress google-app-engine
Share
Improve this question
Follow
edited Nov 28 "13 at 21:09
*

Isaac Bennetch
10.3k22 gold badges2727 silver badges3838 bronze badges
asked Nov 26 "13 at 9:55
*

CatalyxCatalyx
40122 gold badges77 silver badges1515 bronze badges
2
Add a bình luận |

3 Answers 3


Active sầu Oldest Votes
2
As you have mentioned you are following googles own instructions...

Xem thêm: Cách Copy Văn Bản Trên Mạng Về Máy Tính, Sao Chép Và Dán

then in the section titled ...Step 4. Create your wp-config.php configuration file

where the instructions state that you should replace the existing lines with the following:

/** The name of the database for WordPress */define("DB_NAME", "**wordpress_db**");/** MySQL database username */define("DB_USER", "**wp_user**");/** MySQL database password */define("DB_PASSWORD", "**wp_password**");You should enter those lines without the ** either side of the words lượt thích so...

Xem thêm: ... Mở Cmd Khi Bị Khoá Bởi Administrator, Cách Mở Và Chạy Cmd Với Quyền Admin Trên Windows

/** The name of the database for WordPress */define("DB_NAME", "wordpress_db");/** MySQL database username */define("DB_USER", "wp_user");/** MySQL database password */define("DB_PASSWORD", "wp_password");When you hit the default root url for your local ứng dụng - normally localhost:8080 you may get some odd redirects, so instead go direct lớn the local Wordpress install url...

http://localhost:8082/wp-admin/install.phpYou should then get the nice Wordpress install page that you were expecting


Chuyên mục: Kiến thức Hosting