MyBB Community Forums

Full Version: "unable to select database"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there!.

I have a little problem with my mybb installation.

It works great when i use

$config['database']['type'] = 'mysqli';
$config['database']['database'] = 'mydatabase';
$config['database']['table_prefix'] = 'mybb_';

$config['database']['hostname'] = '127.0.0.1';
$config['database']['username'] = 'root';
$config['database']['password'] = 'mypassword';

but it gives a "[READ] unable to select database" when i try


$config['database']['type'] = 'mysqli';
$config['database']['read']['database'] = 'mydatabase';
$config['database']['read']['table_prefix'] = 'mybb_';

$config['database']['read']['hostname'] = '127.0.0.1';
$config['database']['read']['username'] = 'root';
$config['database']['read']['password'] = 'mypassword';

$config['database']['write']['database'] = 'mydatabase';
$config['database']['write']['table_prefix'] = 'mybb_';

$config['database']['write']['hostname'] = '172.74.32.252';
$config['database']['write']['username'] = 'root';
$config['database']['write']['password'] = 'mypassword';


Any sugesstion?, 172.74.32.252( is a mysql master server ), and this webserver is a mysql slave, it replicates the database on each single change on the master.


PD: VersiĆ³n 1.6.4
I copyed&pasted the database name, into the file after 4 attemps.
I would apreciate your help. Merci ^^
I've always put localhost instead of 127.0.0.1 and had no issues. Have you tried that yet?
not, but i have tried this right now, and not getting any good result

may be the database name? it haves a "_" "Example_Foro
This errors appears even only if i only write the read section

when i write ['read'] , then it will start failing

Must i edit anything?

PD: "Problem fixed, but i don't feel like to show the fix, for the bad support"