Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help - Site down!


kaffy

Recommended Posts

Hi, I'm hoping someone here can help me. Originally I had the error message above so my host suggested breaking up my queries between multiple users which would distribute the 50,000 connection queries to multiple users. I did this (last week) and every thing was fine again. I didn't change any code, just added two new users to the database.

 

Any way, I got the same message again this morning! So as I had 2 new users I thought I could delete the one mentioned in the error. I must be wrong in that theory cos now I get this error message:

Warning: mysql_connect(): Access denied for user: 'babyslin_p_os1@localhost' (Using password: YES) in /home/babyslin/public_html/admin/includes/functions/database.php on line 19

Unable to connect to database server!

 

So I added that user again but makes no difference.

HELP PLEASE, I'm desperate to get my shop working again!

 

Cheers,

Kirstie

Link to comment
Share on other sites

It's most likely the case that either your MySQL user name or password is incorrect in both of the configure.php files.

 

Hi Marcella,

 

Thanks, you were right. Working perfectly again. Brilliant!

Kirstie

Link to comment
Share on other sites

Are you on iPower by chance? I recently got this error (max questions) and I'm on iPower. It was driving me up the wall. I did a search and found a workaround.

 

BTW, if you just added users via vdeck and you don't tell oscommerce to use those new users via the osc config file, you will still get the error.

 

I had to replace in configure.php:

 

define('DB_SERVER_USERNAME', 'username_db1');

 

with

 

$DB_SERVER_USERNAME_group[] = 'username_db1';
$DB_SERVER_USERNAME_group[] = 'username_db2';
$DB_SERVER_USERNAME_group[] = 'username_db3';
$DB_SERVER_USERNAME_group[] = 'username_db4';
define('DB_SERVER_USERNAME', $DB_SERVER_USERNAME_group[ rand( 0, (sizeof($DB_SERVER_USERNAME_group)-1) ) ]);

 

Then I went into my servers admin panel and added the users and set permissions to allow them to access the osc database. All the new users should have the same password as the original user.

 

That cleared it up for awhile, untill I installed rss feeds and sitemaps for google and yahoo. Then it reared it's ugly head again. So I went into control panel and added 100 users :P

 

And rather than type the above 96 more times, I just changed it to:

 

for ($i=1, $n=101; $i<$n; ++$i) {
 $DB_SERVER_USERNAME_group[] = 'username_db' . $i;
}
define('DB_SERVER_USERNAME', $DB_SERVER_USERNAME_group[ rand( 0, (sizeof($DB_SERVER_USERNAME_group)-1) )

 

Lets just say I havn't gotten that error since ;)

Link to comment
Share on other sites

Are you on iPower by chance? I recently got this error (max questions) and I'm on iPower. It was driving me up the wall. I did a search and found a workaround.

 

BTW, if you just added users via vdeck and you don't tell oscommerce to use those new users via the osc config file, you will still get the error.

 

I had to replace in configure.php:

 

define('DB_SERVER_USERNAME', 'username_db1');

 

with

 

$DB_SERVER_USERNAME_group[] = 'username_db1';
$DB_SERVER_USERNAME_group[] = 'username_db2';
$DB_SERVER_USERNAME_group[] = 'username_db3';
$DB_SERVER_USERNAME_group[] = 'username_db4';
define('DB_SERVER_USERNAME', $DB_SERVER_USERNAME_group[ rand( 0, (sizeof($DB_SERVER_USERNAME_group)-1) ) ]);

 

 

 

Yeah how did you guess! To be honest I don't find them great. Thanks re the advice above. I did kind of think that perhaps I needed to do something to the code as well. Wierd how it just worked straight off the first time though. Think I'll be adding your suggestions cos I can't be doing with my site being down every week or so!

Thanks again,

Kirstie

 

Then I went into my servers admin panel and added the users and set permissions to allow them to access the osc database. All the new users should have the same password as the original user.

 

That cleared it up for awhile, untill I installed rss feeds and sitemaps for google and yahoo. Then it reared it's ugly head again. So I went into control panel and added 100 users :P

 

And rather than type the above 96 more times, I just changed it to:

 

for ($i=1, $n=101; $i<$n; ++$i) {
 $DB_SERVER_USERNAME_group[] = 'username_db' . $i;
}
define('DB_SERVER_USERNAME', $DB_SERVER_USERNAME_group[ rand( 0, (sizeof($DB_SERVER_USERNAME_group)-1) )

 

Lets just say I havn't gotten that error since ;)

Link to comment
Share on other sites

Yeah how did you guess! To be honest I don't find them great.

 

Everytime I did a search for this problem, anywhere, the user had iPower. And I know what you mean, They promote a 99.9% uptime, but I would say it's more around 70% to 80%. And every time I call them, I get the same response: "Where having trouble with that server". It's like dude, get a better friggen server already. Do you want to go out of business? I'm on the phone with these guys at least twice a month. And don't get me started on the "you're only allowed one cron job" bs, and you have to ask them permission for them to add more. One? One stinking cron job? Ehhh, rant over...

 

Wierd how it just worked straight off the first time though.

 

You are allowed 50,000 questions per user per hour. The hour most likely lapsed allowing for another 50,000 questions. If you do run into a tight spot where it happens and you need it up that moment, you can log into your control panel and go to:

 

Host Manager -> Databases -> Setup->

 

Click on "edit" for the database in question. Scroll down to the bottom and click on "update". That will reset the max questions for that database.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...