Access denied - MySQL PHP connection

Status
Not open for further replies.

iscreamd83

New Member
Messages
3
Reaction score
0
Points
0
Hi,

I've been trying to connect to MySQL on my site, using php mysql_connect.
This is the code:

-------------------
<?php
$dbhost = "localhost";
$dbuser = "iscream_testuser";
$dbpass = "censored";
$database ="iscream_testdb";
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
@mysql_select_db($database) or die( "Attempt to connect has failed.");
?>
-------------------

The error I get:

-----------
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'iscream_testuser'@'10.33.248.81' (using password: YES) in /home/iscream/public_html/mysql_connect.php on line 6
Error connecting to mysql
-----------

Can anyone point to the error what's causing it? I've searched for solutions but haven't found any. By the way, the password is 100% sure, the user has all privileges set for the database.

Thanks in advance,
iScream
 

MaestroFX1

Community Advocate
Community Support
Messages
1,577
Reaction score
60
Points
0
Could you please post the ips listed under cpanel >> remote mysql ?
 

iscreamd83

New Member
Messages
3
Reaction score
0
Points
0
On that page the only thing it displays: Access Host | Cpanel::Mysql=HASH(0x7063e10).
I'm new to PHP & MySQL so I don't know what that means.
And if it matters I'm on free hosting. But I still should be able to connect to MySQL using PHP right?

Thanks for the help
iScream
 

stpvoice

Community Support Rep
Community Support
Messages
5,987
Reaction score
212
Points
63
Yes, you should be able to use php/MySQL.

Just to confirm, there should be a table with 2 columns. One with "Access Hosts" and the other with a remove button. Could you just tell us what's in the rows, if any? It'll be numbers like 11.22.33.% etc.
 

iscreamd83

New Member
Messages
3
Reaction score
0
Points
0
As I said, it displays Cpanel::Mysql=HASH(0x7063e10)
Image for proof:
2dgur0l.png
 

stpvoice

Community Support Rep
Community Support
Messages
5,987
Reaction score
212
Points
63
Okay. Thanks for that.
I'm going to escalate this for an admin to sort out, as there should be more entries there, but can't be added from the frontend because of restrictions.

Thank you for your co-operation. :)
 
Status
Not open for further replies.
Top