MySQL Connection Errors

From Free Hosting Wiki
(Difference between revisions)
Jump to: navigation, search
[checked revision][checked revision]
(full rewrite)
(remove from KB)
 
(2 intermediate revisions by 2 users not shown)
Line 35: Line 35:
 
but If you see in the error message [ ...(using password: NO)... ] that is not good<br>
 
but If you see in the error message [ ...(using password: NO)... ] that is not good<br>
  
you script (or CMS) must give the correct password when connecting<br>
+
your script (or CMS) must give the correct password when connecting<br>
 
[ Cat+2Dogs! ] is not the same as [ cat+2dogs! ]
 
[ Cat+2Dogs! ] is not the same as [ cat+2dogs! ]
 
<br>
 
<br>
Line 41: Line 41:
  
  
Check your settings with [[MySQL Connection information |MySQL information]].
+
Check your settings with [[MySQL Information|MySQL information]].
 
<br>
 
<br>
  
Line 47: Line 47:
 
'''Note: Free hosting accounts do not have remote MySQL access - you can only access MySQL data via a script (or CMS) and phpMyAdmin'''
 
'''Note: Free hosting accounts do not have remote MySQL access - you can only access MySQL data via a script (or CMS) and phpMyAdmin'''
 
<br>
 
<br>
 
[[Category:KB]]
 

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

Personal tools
Namespaces

Variants
Actions