MyBB Community Forums

Full Version: Database problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Sorry in advance, I know it's a MySQL question and has nothing to seek here.
But hopefully I can get help , at least a advice what forum or website I can research for it .

Thanks in advance.

My problem, 
I upload the database , set the config.php with the right parameters
Like name of database, user and password
But I get this reply 

SQL Error:0 -Query:[READ] Unable to select database

Sorry again for the MySQL question 

Have a nice day
did you change your hoster?

there are four settings for the database, don't forget "hostname", this is most "localmost" but not every time, some hosters need here other input

and check the databasename, if it really correct
Hi bv64

Thanks

No I didn't change the hoster, same .
Do you mean for hostname really 'localmost' or 'localhost' ?

That was is set

$config['memcache']['host'] = 'localhost';
$config['memcache']['port'] = 11211;


$config['redis']['host'] = 'localhost';
$config['redis']['port'] = 6379;


I double check the database name is correct
sorry, that was a typo Wink

the database settings are the lines 10ff in the inc/config.php

$config['database']['type'] = 'mysqli';
$config['database']['database'] = 'DATABASENAME';
$config['database']['table_prefix'] = 'PREFIX_';

$config['database']['hostname'] = 'HOSTNAME';
$config['database']['username'] = 'DATABASEUSER';
$config['database']['password'] = 'DATABASEPASSWORD';

one of them must be wrong
Hi

Yeah happen to me all the time with the auto correction 😅

I double check again and again , all ok even the 'localhost' in row 14

Can be the prefix the problem?

$config['database']['table_prefix'] = 'mybbvy_';
it this is your prefix it is ok, if isn't not

I don't know

no idea at the moment
Thanks for help
Maybe just a simple malfunction in the database

Regards
This is not a prefix trouble, the error is Unable to select database
I guess user/password are ok, the error will be "access denied for <user>@<host>".

So the only thing I can guess, it's that your user hasn't rights on the DB. Check user's rights.