• 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 ] im looking for Red Balck Theme

Started by mzikagate


Replies: 3
Views: 2108

[ Video Sharing CMS v4 ] [mod_security conflict] Theme ,site going crazy

Started by Sauca Adrian


Replies: 31
Views: 3514

[ Video Sharing CMS v4 ] Change visitor to signup

Started by drwho


Replies: 1
Views: 1257

[ Video Sharing CMS v4 ] Send Message to other users?

Started by editamedia


Replies: 10
Views: 2784

[ Video Sharing CMS v4 ] How to change the video source

Started by rhyle0827


Replies: 5
Views: 1817

change/ edit video extension

Started by AlexH


Replies: 10
Views: 2742

[ Video Sharing CMS v4 ] New user group

Started by ASDF


Replies: 1
Views: 1613