MySQL Connection Errors
[checked revision] | [checked revision] |
(Initial article.) |
(remove from KB) |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | + | When your script (or CMS) attempts - but fails to connect to X10hosting's MySQL server - you usually receive an error message - such as:<br> | |
+ | "''SQLSTATE[28000] [1045] Access denied for user 'user_name'@'localhost' (using password: NO)...''" | ||
+ | <br> | ||
+ | |||
+ | |||
+ | |||
+ | For MySQL connection to work it needs three (3) pieces of information which must match what is on the MySQL server: | ||
+ | <br> | ||
+ | |||
+ | * Host | ||
+ | * Username | ||
+ | * Password | ||
+ | |||
+ | |||
+ | |||
+ | == Host == | ||
+ | The host name must be [ localhost ] | ||
+ | <br> | ||
+ | If you see in the error message [ ...'@'localhost' ] that is good | ||
+ | <br> | ||
+ | but if you see [ ...'@'baddog.com' ] or anything else - that is not good | ||
+ | <br> | ||
+ | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Username == | == Username == | ||
− | When you | + | 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 |
+ | <br> | ||
+ | Example - if your cPanel username is [ bigboys ] and you create the user [ toy ] - the database username is [ bigboys_toy ] - not [ toy ] | ||
+ | <br> | ||
+ | |||
== Password == | == Password == | ||
− | + | If you see in the error message [ ...(using password: YES)... ] that is good<br> | |
+ | but If you see in the error message [ ...(using password: NO)... ] that is not good<br> | ||
− | + | your script (or CMS) must give the correct password when connecting<br> | |
+ | [ Cat+2Dogs! ] is not the same as [ cat+2dogs! ] | ||
+ | <br> | ||
− | |||
− | |||
− | |||
− | |||
− | + | Check your settings with [[MySQL Information|MySQL information]]. | |
− | + | <br> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | |||
− | + | '''Note: Free hosting accounts do not have remote MySQL access - you can only access MySQL data via a script (or CMS) and phpMyAdmin''' | |
+ | <br> |
Latest revision as of 00:13, 17 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
[edit] Host
The host name must be [ localhost ]
If you see in the error message [ ...'@'localhost' ] that is good
but if you see [ ...'@'baddog.com' ] or anything else - that is not good
[edit] Username
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 ]
[edit] Password
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