MyBB Community Forums

Full Version: MyBB not connecting to mysql database
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Quote:p.s I have not set any password for mysql
a password is required for the database. leaving it blank might not work ! about mysqli::_construct (also applied to mysql_connect that is used by MyBB) says:

    If not provided or NULL, the MySQL server will attempt to authenticate the user against those user records which have no password only. This allows one username to be used with different permissions (depending on if a password is provided or not).
Seems for mysqli_connect, it's different from mysql_connect where PHP will try to use no password if an empty string is passed.

So, as @.m. has suggested, set a password for your user.

However, MyBB should have made it clear whether or not an empty password for database is applicable.

OK. I tried installing a MyBB instance on PHP 7.1.33 + MySQL 5.7.28 (with mysqli) on Windows, with an empty password. It's working.

Will OP try to check if that user has relevant privileges on that database?