MyBB Community Forums

Full Version: find conf file to add these codes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
hi

i read one thread and now i want to add these codes in config file but can't find the config file

where it is located and how i can ad these codes


$dbusers = array(
array('user' => 'site_connect1', 'password' => 'DBPassword')
, array('user' => 'site_connect2', 'password' => 'DBPassword')
, array('user' => 'site_connect3', 'password' => 'DBPassword')
, array('user' => 'site_connect4', 'password' => 'DBPassword')
, array('user' => 'site_connect5', 'password' => 'DBPassword')
);
$mysql_user = $dbusers[rand(0, count($dbusers) - 1)];

$config['database']['type'] = 'mysql';
$config['database']['hostname'] = 'localhost';
$config['database']['username'] = $mysql_user['user'];
$config['database']['password'] = $mysql_user['password'];
$config['database']['database'] = 'site_database';
$config['database']['table_prefix'] = 'mybb_';
Do you really need to do that?? You know your host could ban your account if they don't like you doing this??

If you really think you need it, put it in config.php. The bottom chunk is already in there so replace that bit with the code here.
"The bottom chunk is already in there so replace that bit with the code here" unable to understand this line please clarify

also where i will find config file, i search it in mybb files but not found
Not sure how I can rephrase it. The bottom piece of code is already in config.php, remove that and replace it with the code above, and then edit your database details in again.

The file is in the ./inc/ folder.

Why do you think you need to do this anyway?? I would strongly recommend not doing this.
another question is there i need to change in these codes i mean what i have to replace for these words site_connect1, password , dbpassword ( same info for each line or to create new database for each site connect)
array('user' => 'site_connect1', 'password' => 'DBPassword')

$mysql_user = $dbusers[rand(0, count($dbusers) - 1)];
also need to change any change in this line or not

i think my hosting co. is not able to take load of 1000+ users and i m going to huge promotion of this website. i asked my hosting that how many connection they are providing and they said there is no limit

and how they will find out that i have done this...
If there's no limit on connections that you have absolutely no reason to do this Undecided Seriously, you don't need to do it. Reading threads and applying random bits of code for them is not going to get you anywhere. This method is not the best way of fixing the issue this fixes anyway.

Hosts aren't stupid, they'll be able to see you're using multiple users to get around limits they impose.
ok let me know how i can find out that what my host is saying is correct, he said there is no connection limit how i can believe... on that way when i m getting hosting package

10gb space, 100gb bandwidth, unlimited mysql db, unlimited email account, unlimited ftp account at just around 50 $ per year
How am I supposed to know if what they're saying is correct?? Surely the only way to find out is for you to ask them?? I don't think you know what this code is doing, let alone why you need it.
ok thanks let me do this on my own risk just help that i need to change something in codes at first phase

i mean what i have to replace for these words site_connect1, password , dbpassword ( same info for each line or to create new database for each site connect)
array('user' => 'site_connect1', 'password' => 'DBPassword')

$mysql_user = $dbusers[rand(0, count($dbusers) - 1)];
also need to change any change in this line or not
This is exactly the point I'm making, you want to make this change but you don't know what to put in there, because you don't know what it's doing or why you think you need to do it.

If it wasn't obvious enough though you need to put in the database username and password of new database users you create. site_connect1 is the username, DBPassword is the password. You don't need to change anything else.

I don't know why you insist on ignoring me saying not to do this though.
Pages: 1 2