Jan K. van Dalen
|
| Posted: 05/30/2008, 7:15 AM |
|
Hi Everyone,
Ok, I'm new to PHP.
I created a small test that runs 100% locally connecting to the database @
my hosting company (www.bluehost.com). IOW, both locally & @ my host ...
I'm connecting to the same database.
When I upload (connecting to the same database using the same connection
string) I get this error:
Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user
'janvanda_admin'@'box434.bluehost.com' (using password: YES) in
/home2/janvanda/public_html/gmtest/db_mysql.php on line 97
Database error: cannot connect to Database Access denied for user
'janvanda_admin'@'box434.bluehost.com' (using password: YES)
MySQL Error
Session halted.
Can you give me some indication of what the problem is?
Thank you.
|
|
|
 |
jjrjr1
Posts: 942
|
| Posted: 05/30/2008, 7:39 AM |
|
Hi
Are you sure you are connecting to the remote database when running your app locally.
If you look in common.php you will see the connnect strings for the database.
Let me see what is there.
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com |
 |
 |
datadoit
|
| Posted: 05/30/2008, 9:25 AM |
|
It's likely your hosting company is blocking the MySQL default port of
3306, thus you can't connect to it remotely. This is standard and
advised practice.
Suggest you run MySQL locally when you're developing and testing. Easy
to do with products like XAMPP and WAMP. Then in your database
connection strings always refer to the host as 'localhost'.
|
|
|
 |
Jan K. van Dalen
|
| Posted: 05/30/2008, 1:12 PM |
|
Hi Everyone,
Ok, the problem is that I needed to add the IP address of the server to the
"allowed" remote connection list ... regardless of the fact that both the
host & Mysql server are on the same server.
I'm up which is what is important ... thanks for the help.
"datadoit" <datadoit@forum.codecharge> wrote in message
news:g1p9q6$aao$1@news.codecharge.com...
> It's likely your hosting company is blocking the MySQL default port of
> 3306, thus you can't connect to it remotely. This is standard and advised
> practice.
>
> Suggest you run MySQL locally when you're developing and testing. Easy to
> do with products like XAMPP and WAMP. Then in your database connection
> strings always refer to the host as 'localhost'.
|
|
|
 |
|