• UID2618
  • Fans0
  • Follows0
  • Posts1

Error establishing a database connection

More Posted time:Jul 18, 2017 20:09 PM
I purchased ECS package with WordPress on LampUbuntu, data plan, DNS & Domain and used the 5-minute WordPress install to set up a website and all well for one month.
Now suddenly unable to reach the site with "Error establishing a database connection" message.
Alibaba Support unable or unwilling to explain in plain English how I can access my files to fix possible corrupt WPress files.
They initially suggested:  
it may cause by the config of wordpress, you can change like below:
At 291 line of ./wp-includes/class-http.php, change like below:
$request_order = apply_filters( ‘http_api_transports’, array( ‘streams’ ), $args, $url );
It means that remove characters below:
My problem is I do not know how to access my WordPress installation. If I did I could repair/replace files.
I tried using FileZilla but cannot access the server.
Alibaba Support will not even answer a simple question asking if is it possible to connect by FTP or is that not possible in this scenario?!!!
Can someone please explain how to access the WordPress installation on the above package?
Alibaba Support are being no help, saying they don't provide support in such cases.
Really regretting handing over my money to Alibaba!
Hope someone can help or point me to the right resources.


  • UID7292
  • Fans0
  • Follows0
  • Posts1
1st Reply#
Posted time:Apr 16, 2019 19:04 PM
Hii Wilf ,
Facing the same problem as yours ERROR ESTABLISHING A DATABASE CONNECTION ....have  you resolved this issue? if yes then please tell me also how to solve this issue .

  • UID6831
  • Fans0
  • Follows0
  • Posts5
2nd Reply#
Posted time:Jun 23, 2019 19:23 PM
Hi, Can you see if security groups has been set well. The firewall maybe breaking the connection between wordpress and MySQL Server. Additionally use this  https://www.alibabacloud.com/help/doc-detail/25425.htm to try logging into your ECS instance and try to debug the issue.

Assistant Engineer
Assistant Engineer
  • UID7973
  • Fans2
  • Follows0
  • Posts66
3rd Reply#
Posted time:Sep 7, 2019 0:22 AM
This is the most common issue faced by site owners. I will share some quick methods to Fix this issue:
  • Have a Look at your Blog’s wp-config.php File
  • Changing DB_HOST Value
  • Check Database Username and Password
  • Create New Database User with Password.