PHP to MySQL Connection Error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Cratylus
Forum Newbie
Posts: 2
Joined: Mon Dec 29, 2008 5:50 pm
Location: Pueblo West, CO
Contact:

PHP to MySQL Connection Error

Post by Cratylus »

I am relatively new to PHP and MySQL. I amy trying to make my PHP connect to MySQL on a server within my network. I keep getting an error when I try to send the information to my server.

Client: http://www.easydispatch.com.com
Error Number: 2
Error: mysql_connect() [<a
href='function.mysql-connect'>function.mysql-connect</a>]: Access denied for user: 'user@saleen.websitewelcome.com' (Using password:
YES)
Error in file: /home/libertyc/public_html/EDTest/reservation.php
Error at line: 387


Which doesn't make sense to me because I have this working on other systems with other servers. I copied all that I had, and I have the ports 3306 and 3389 open like I do for the other servers.

the line at 387 reads: these are lines 386, 387, 388, and 389

//connect to MySQL and select database to use
$connection = mysql_connect($EDServerIP,'user','pass');
$db = mysql_select_db('easydispatch',$connection);
$sql = "Insert Into RepeatOrders";

If anyone has any ideas that would be great, I feel like beating my head on a desk after dealing with the same problem all day. :lol:
Thanks in Advance
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: PHP to MySQL Connection Error

Post by requinix »

Have you checked that your machine (ie, its IP address) is allowed to connect to the server?
User avatar
Cratylus
Forum Newbie
Posts: 2
Joined: Mon Dec 29, 2008 5:50 pm
Location: Pueblo West, CO
Contact:

Re: PHP to MySQL Connection Error

Post by Cratylus »

I am using my machine as the server. That is why in the router I set it up to port forward to my machine. I have it set up that 3306 and 3393 point to my machine, 192.168.1.19 and the MySQL Database is on my machine. On the ODBC I have it set up so that in the ODBC it connects to the localhost (127.0.0.1)
Post Reply