Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Mysql error in Admin


DRicher33

Recommended Posts

Hi everyone,

 

I've tried everything to fix my oscommerce admin area and I really need help.

 

Everything was working great until my hosting co. decided to move my website to a new location on their server without telling me. I fixed the configure.php in the includes and I thought I did so in the admin area but now I get this sql error:

 

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /opt2/home3/aquasrc/public_html/store/admin/includes/functions/database.php on line 19

Unable to connect to database server!

 

Here is my admin configure.php file:

 

define('HTTP_SERVER', 'http://www.aquasourceproducts.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTP_CATALOG_SERVER', 'http://www.aquasourceproducts.com');

define('HTTPS_CATALOG_SERVER', 'https://www.aquasourceproducts.com');

define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module

define('DIR_FS_DOCUMENT_ROOT', '/home3/aquasrc/public_html/store/'); // where the pages are located on the server

define('DIR_WS_ADMIN', '/store/admin/'); // absolute path required

define('DIR_FS_ADMIN', '/home3/aquasrc/public_html/store/admin/'); // absolute pate required

define('DIR_WS_CATALOG', '/store/'); // absolute path required

define('DIR_FS_CATALOG', '/home3/aquasrc/public_html/store/'); // absolute path required

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');

define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');

define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');

define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');

define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');

define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

 

// define our database connection

define('DB_SERVER', 'mysql1.dca1.superb.net'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'xxxx');

define('DB_SERVER_PASSWORD', 'xxxx');

define('DB_DATABASE', 'xxxx');

define('USE_PCONNECT', 'false'); // use persisstent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

?>

 

Help!

 

Thanks in advance. :D

 

Dave

Link to comment
Share on other sites

Adding one more thing:

 

Before all this started I had a problem with Orders processing but not showing up in my Admin area. If I searched for the order it was there...it just wouldn't show up in the list under Orders.

 

Could this be related to my new error of not connecting to the mysql DB?

 

Any help would be great..I'm getting desparate!

 

Dave

Link to comment
Share on other sites

Since it's trying to connect to mysql.sock, it's trying to connect to the database on localhost. The server name mysql1.dca1.superb.net looks like it's a dedicated mysql server, so it's probably not the localhost.

 

I believe if the mysql client cannot connect to the specified host, it will try to connect to localhost, hence the message (there's probably no mysql server on localhost).

 

Copy and paste the database section from includes/configure.php to admin/includes/configure.php.

Contributions

 

Discount Coupon Codes

Donations

Link to comment
Share on other sites

Thanks for the help but no joy. :(

 

Yes the mysql server is dedicated.

 

It's weird that it works for the shopping cart but not for the admin area. I copied the DB fields and they match for admin/includes and catalog/includes.

 

I'm sure I'm missing something obvious because it was working...

 

Dave

Link to comment
Share on other sites

1. Is your admin section shared SSL? It's possible that the SSL server is not allowed to connect to the mysql server.

 

2. If 1 is the case, then I would expect your catalog to work, but going to secure pages (such as MyAccount and Checkout) should break it. Is this the case?

 

3. I think this is probably a server configuration problem, since you're sure the database information is correct. Go ahead and put in a support ticket with your host.

Contributions

 

Discount Coupon Codes

Donations

Link to comment
Share on other sites

1. Is your admin section shared SSL? It's possible that the SSL server is not allowed to connect to the mysql server.

 

2. If 1 is the case, then I would expect your catalog to work, but going to secure pages (such as MyAccount and Checkout) should break it. Is this the case?

 

3. I think this is probably a server configuration problem, since you're sure the database information is correct. Go ahead and put in a support ticket with your host.

 

Thanks for the quick response.

 

1. Ya know, I think my certificate just expired. Would that cause the error? Bah sorry for the newbie question...I really should catch up on SSL.

 

2. MyAccount and Checkout work.

 

Thanks,

Dave

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...