WordPress knowledge sharing

Error establishing a database connection in the new version of Siteground

When the website is moved from the server to the siteground virtual host, the website files and database are restored. When you visit the website page, you will be prompted: Error establishing a database connection. At this time, the webmaster found Lao Wei to help solve the problem. Later, Lao Wei recorded and shared the solution process.

Foreign trade, B2C/C2C and other websites suggest registering domain names abroad. open Namesilo official website , enter and select in the search box, and then register. Remember to use the discount code to save money. Discount code click Course of domain name registration of foreign domain name provider Namesilo obtain.
The 18th anniversary of SiteGround virtual host will greatly promote 25% discount on virtual host+free website moving service+3 months free site scanner
Suggested choice of foreign trade website SiteGround virtual host SiteGround virtual host is the host officially recommended by WordPress, which is a perfect match with WordPress. The WordPress website on the Siteground virtual host has excellent speed and stability, and has been highly evaluated on foreign test websites.
About SiteGround: SiteGround Theme

Introduction to Siteground

An American host company, which provides virtual hosts, is famous for its ease of use, quickness, convenience and high speed. Many people in the domestic and foreign trade circles are using it, including foreign trade factories, trading companies, etc. One click deployment of SSL certificates, one click cache acceleration, one click cdn acceleration, one click move and other functions are all available. It is convenient for novices to use, and the speed of both domestic management websites and foreign customers visiting websites is good.

If you want to be a foreign trade website, Click me to open Go to siteground to register a new account and start your journey of building a foreign trade website.

Articles about the establishment of siteground:

What are the advantages of choosing Siteground virtual host for foreign trade websites?
How to purchase a new version of SiteGround virtual host Detailed graphic process is a must for novices
Detailed introduction to the new version of SiteGround control panel and how to use it
More Tutorials Click me directly

Problem description

The webmaster's operation is to first establish an empty website on the siteground, then create a database and user name respectively, import the database file with phpmyadmin, and open the domain name to prompt Error establishing a database connection.

Analyze problems

According to common sense, there is a discrepancy between the address, account number and password of the wordpress database, which is no problem after several checks. So what else might be the problem?

In addition to the database connection information error, it may also be caused by MySQL database downtime, database table corruption, etc.

Lao Wei found that there was no user account associated with the new database name, and then went to the USERS to check that there was no bound database account. Once he knew the problem, it occurred here.

When creating a new database, he clicks create database, then the USERS tab, and then click create user. This is wrong.

 Siteground creates a new database and user name account
Siteground creates a new database and user name account

The correct way is to first create a new database, and then click the villain icon with the+sign on the far right side of the database line below. As shown in the figure below, bind the database and the User account together, so that the database permissions are available and the website can be accessed normally.

If you want to create a new USER account first, go to the far right and click the database icon to select the appropriate database binding.

To sum up, this problem is caused by the fact that the database and account are independent, and the database permissions are insufficient. As long as the database and account are associated and bound together, it will be OK.

 Siteground binding database and user name account
Siteground binding database and user name account
Like( zero )
Article name: New Siteground Site Establishment Prompt Error Establishing a Database Connection Resolution Process
Article link: https://www.vpsss.net/21003.html
Copyright notice: The resources of this website are only for personal learning and exchange, and are not allowed to be reproduced and used for commercial purposes, otherwise, legal issues will be borne by yourself.
The copyright of the pictures belongs to their respective creators, and the picture watermark is for the purpose of preventing unscrupulous people from stealing the fruits of labor.