Page 1 of 1

PHP to MySQL Connection Error

Posted: Mon Dec 29, 2008 5:59 pm
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

Re: PHP to MySQL Connection Error

Posted: Mon Dec 29, 2008 6:23 pm
by requinix
Have you checked that your machine (ie, its IP address) is allowed to connect to the server?

Re: PHP to MySQL Connection Error

Posted: Tue Dec 30, 2008 9:31 am
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)