• Welcome to PHPVIBE Forums. Please log in.

Can we change db user to avoid exceeding the db max_questions limit on our hosts

Started by YoSethos,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

YoSethosTopic starter

Hi there,

I have created a large website based on phpvibe.com and, believe it or not, it is a coloring pages website, heavily modified by myself.
You can check it here : www.kizicolor.com

My host has a db max_questions limit of 75000. I have created multiple database users for the same database.
What I want to ask you is this: how can I modify the vibe_config.php file in order to change the username based on an array of usernames every 45 minutes, to say ?

I found this code on a website but I don't really know how to modify it for the vibe_config file...
$dbusers =array (
  0 => array(
    'username' => 'user1',
    'password' => 'user1'
  ),
  1 => array(
    'username' => 'user2',
    'password' => 'user2'
  )
  );
  $dbindex =array_rand($dbusers);

$databases['default']['default'] = array (
  'database' => 'mydb',
  'username' => $dbusers[$dbindex]['username'],
  'password' => $dbusers[$dbindex]['password'],
  'prefix' => '',
  'host' => 'localhost',
  'port' => '3306',
  'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
  'driver' => 'mysql',
);

What I want is to distribute the database connections within an hour to at least 2 usernames so that I avoid my website going down due to exceeding the max_questions limits my hosting has...

Thank you
  •  

 

Similar topics (7)

[ Video Sharing CMS v4 ] [REQ]New Theme

Started by AlexH


Replies: 9
Views: 1850

[ Video Sharing CMS v4 ] User Friendly URL for translations

Started by Rafa


Replies: 9
Views: 988

[ Video Sharing CMS v4 ] How do I get: Facebook User Emails

Started by megaman79


Replies: 9
Views: 1119

[ Video Sharing CMS v4 ] Language switcher doesn't change

Started by kingofseo


Replies: 5
Views: 1505

[ Video Sharing CMS v4 ] credit some money in users account

Started by nobelkansal


Replies: 1
Views: 1534

[ Video Sharing CMS v4 ] off canvas menu/ mobiele sidebar menu creat

Started by editamedia


Replies: 4
Views: 1223

[ Video Sharing CMS v4 ] How to change easy player logo?

Started by infosolution6


Replies: 1
Views: 1102