MySQL Connection Errors

From Free Hosting Wiki
(Difference between revisions)
Jump to: navigation, search
[checked revision][checked revision]
(spelling you*your)
Line 41: Line 41:
Check your settings with [[MySQL Connection information |MySQL information]].
Check your settings with [[MySQL Information|MySQL information]].

Revision as of 12:58, 16 January 2012

When your script (or CMS) attempts - but fails to connect to X10hosting's MySQL server - you usually receive an error message - such as:
"SQLSTATE[28000] [1045] Access denied for user 'user_name'@'localhost' (using password: NO)..."

For MySQL connection to work it needs three (3) pieces of information which must match what is on the MySQL server:

  • Host
  • Username
  • Password


The host name must be [ localhost ]
If you see in the error message [ ...'@'localhost' ] that is good
but if you see [ ...'@'' ] or anything else - that is not good


When you create a user with cPanel - your cPanel username and an underscore are added to the front of it - you do not add it - cPanel does
Example - if your cPanel username is [ bigboys ] and you create the user [ toy ] - the database username is [ bigboys_toy ] - not [ toy ]


If you see in the error message [ ...(using password: YES)... ] that is good
but If you see in the error message [ ...(using password: NO)... ] that is not good

your script (or CMS) must give the correct password when connecting
[ Cat+2Dogs! ] is not the same as [ cat+2dogs! ]

Check your settings with MySQL information.

Note: Free hosting accounts do not have remote MySQL access - you can only access MySQL data via a script (or CMS) and phpMyAdmin

Personal tools