Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Unable to connect to database server


kingefio

Recommended Posts

Posted

Could someone help me with this problem?

 

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /hsphere/local/home/track/mydomain.com/shop/includes/functions/database.php on line 19

Unable to connect to database server!

 

Thanks,

 

 

K

Posted

You need to contact your host to get the proper name for your MySQL database server. Then you need to edit includes/configure.php and make sure you have the correct DB_SERVER entry. Same for admin/includes/configure.php.

Contributions

 

Discount Coupon Codes

Donations

  • 2 months later...
Posted

I get a similar error:

Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/username/public_html/b_catalog/admin/includes/functions/database.php on line 17

Unable to connect to database server!

I tried to find the database.php file in PhpMyAdmin, but I couldnt find the directory. Which folder is it in (configuration.php, products.php, ..)?

 

It is likely that I didnt enter a required field upon entering a new product. I know what the name of the product is if I had a list of saved products in the database.

Posted
I get a similar error:

 

I tried to find the database.php file in PhpMyAdmin, but I couldnt find the directory. Which folder is it in (configuration.php, products.php, ..)?

 

It is likely that I didnt enter a required field upon entering a new product. I know what the name of the product is if I had a list of saved products in the database.

 

 

database.php is in includes/functions/, but the problem is not in that file. The problem is either with your host (the mysql server could be down) or in your configuration file includes/configure.php. You need to make sure your DB_SERVER is set to the proper value - only your host can tell you for sure what that should be.

Contributions

 

Discount Coupon Codes

Donations

Posted

Thanks Thorson, but it apparantly reset itself and now works again.

 

I went into the last added product to 'overwrite' and save it again, thereas I noticed the article price (netto) being exactly 100, that's the only thing I think could presume as being a bug.

Otherwise there must have been an interruption to the host.

Archived

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

×
×
  • Create New...