Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

MySQL Error


Otispup

Recommended Posts

Posted

I setup (on the recommendation of the tutorial I am going throug) an osCommerce site on my local system to use as a test/learning environment while I learned to use the software. Works fine as long as I don't have the physical cable hooked to my machine to get on the internet. When I plug in the cable, it gives me a mySQL error and won't let me bring up my website pages in the browser. Can someone tell me what I am missing that will allow me to both work on my website in "local" mode and be on the internet at the same time? Thanks.

Posted

Sure. Thanks for helping...

 

The error is:

 

Warning: mysql_connect() [function.mysql-connect]: Host '192.168.2.4' is not allowed to connect to this MySQL server in C:\Program Files\Apache Group\Apache2\htdocs\catalog\includes\functions\database.php on line 19

Unable to connect to database server!

 

If I unplug my ethernet cable, I can get in fine. Any ideas?

Posted
Sure. Thanks for helping...

 

The error is:

 

Warning: mysql_connect() [function.mysql-connect]: Host '192.168.2.4' is not allowed to connect to this MySQL server in C:\Program Files\Apache Group\Apache2\htdocs\catalog\includes\functions\database.php on line 19

Unable to connect to database server!

 

If I unplug my ethernet cable, I can get in fine. Any ideas?

 

You may need to change your includes/configure.php and admin/includes/configure.php.

 

My guess is that your DB_SERVER entry is currently:

 

define('DB_SERVER', '192.168.2.4');

 

Try changing it to:

 

define('DB_SERVER', 'localhost');

 

Hope this helps,

Max.

Posted

I tried that and it's still doing it. Thanks for your help through. I must have configured something wrong as I went through the first time. Maybe I need to go back through.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...