• 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 ] Remove the 100 Playlist Limit Restriction on the side panel drop down

Started by DeadFish


Replies: 18
Views: 3515

[ Video Sharing CMS v4 ] Wordpress User Database

Started by awsjulio


Replies: 0
Views: 804

[ Video Sharing CMS v4 ] Can we have a theme like this

Started by sharekhan


Replies: 10
Views: 2142

[ Video Sharing CMS v4 ] Remove and replace new users box

Started by ampstar


Replies: 0
Views: 1249

Re: [ Video Sharing CMS v4 ] Re: Remove the 100 Playlist Limit Restriction on the side pane

Started by spirog


Replies: 2
Views: 1651

[ Video Sharing CMS v4 ] I'd like to code my own theme

Started by jaygrand


Replies: 4
Views: 1604

[ Video Sharing CMS v4 ] Youtube api limit problem

Started by mihai


Replies: 2
Views: 1098