Wordpress "Error establishing a database connection"

Status
Not open for further replies.

thegoldenpuffle61

New Member
Messages
19
Reaction score
0
Points
0
I am trying to upload my wordpress to my website taylorswifties.co.cc but when I click on "blog" all it shows is a big bold print saying "Error establishing a database connection"

Here is what is in wp-config:

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'hannahxd_wordpress');

/** MySQL database username */
define('DB_USER', 'hannahxd');

/** MySQL database password */
define('DB_PASSWORD', '***********');

/** MySQL hostname */
define('DB_HOST', 'localhost');

Please help! If anyone needs more information, please let me know.
 

Derek

Community Support Force
Community Support
Messages
12,882
Reaction score
186
Points
63
To use MySQL in your website you will first need to create a MySQL database and a MySQL User. You can do this from cPanel. (Don't forget to link the User to your Database).

Then you need to configure your script to connect to MySQL, the following settings should be used:
• Host/Server Name = 'localhost'
• Port = '3306'
• Username = [Your*cPanel username followed by an underscore and the MySQL username you configured in cPanel]
• Password = [The password that you used when creating the MySQL user]
• Database = [ Your cPanel username followed by an underscore and the name of the database that you created in cPanel]
Free hosting accounts do not have remote MySQL access.


Your mysql user is wrong.
 

Zubair

Community Leader
Community Support
Messages
8,766
Reaction score
305
Points
83
Your blog is working fine now. so I am going to close this thread to mark it as resolved. Feel free to create a new thread if you need more help.
***Thread Closed***
 
Status
Not open for further replies.
Top