Database Connectivity Error

Status
Not open for further replies.

sunilame88

New Member
Messages
22
Reaction score
0
Points
1
Thanx Sir,,

But still um not having my database connected...

my cpanel username is sunilame and user is sonu.. that means if um not wrong my variables will be

host : localhost
username : sunilame_sonu
password: whatever i have set for user sonu....


it is showing

"Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'sunilame_sonu'@'10.33.248.75' (using password: YES) in /home/sunilame/public_html/db/check.php on line 22"


I have temporarily made a Database connectivity tester page to check this

www.sonuame.x10hosting.com/db


um stucked in it... plzz help me out...
 

Jarryd

Community Advocate
Community Support
Messages
5,534
Reaction score
43
Points
48
Hello, i created a test database on your account and a test user, and it worked fine. I assume you were using just the username toconnect to mysql when you have to use cpanelusername_databaseuser. Read below.

Here are the main details for setting up a MySQL database connection. You should have created the database in cPanel first.
- Host = [ localhost ]
- Port = [ 3306 ]
- User = [ Your cPanel username + underscore + MySQL username you configured in cPanel (eg., jdoe_mysql) ]
- Pass = [ The password you set up in cPanel ]
- Database = [ Your cPanel username + underscore + database name you set up from cPanel ]
 
Status
Not open for further replies.
Top