Not Solved [Error Message] MyBB not connecting to mysql database
#1
Not Solved
I have installed myBB on my server(aws ec2), when i add my mysql database credentials(its correct), it says
Quote:
[font=Arial,]There seems to be one or more errors with the database configuration information that you supplied:
Could not connect to the database server at 'localhost' with the supplied username and password. Are you sure the hostname and user details are correct? Once the above are corrected, continue with the installation.[/font]
Even tho the credentials are correct
p.s I have not set any password for mysql
[font=Arial,]screenshot: Check the error message and other details have entered[/font]
Reply
#2
Not Solved
(2019-12-23, 12:58 PM)pixomaryt Wrote: I have installed myBB on my server(aws ec2), when i add my mysql database credentials(its correct), it says
Quote:
[font=Arial,]There seems to be one or more errors with the database configuration information that you supplied:
Could not connect to the database server at 'localhost' with the supplied username and password. Are you sure the hostname and user details are correct? Once the above are corrected, continue with the installation.[/font]
Even tho the credentials are correct
p.s I have not set any password for mysql
[font=Arial,]screenshot: Check the error message and other details have entered[/font]
Hey, 
do you have all the required PHP extensions? If so, it should be working fine. Are you 100% sure everything is correct and the mysql service is running?
Reply
#3
Not Solved
Quote:p.s I have not set any password for mysql
a password is required for the database. leaving it blank might not work !
Reply
#4
Not Solved
https://www.php.net/manual/en/mysqli.construct.php about mysqli::_construct (also applied to mysql_connect that is used by MyBB) says:
Quote:passwd

    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?
Could be wrong but worth a try.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)