MyBB Community Forums

Full Version: "Could not connect to the database server" while everyting is correct?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Here is my configuration:[Image: B274Dlx.png]
And Mybb Installation Wizard:
[Image: MR81ikv.png]
Error:
[Image: 1K5oHTo.png]
"Database Password" is the same when I connect using "mysql -u root -p".
are you sure that localhost can be used as database server name ..

some servers do not allow using root as the database user
can you create another user, grant all privileges & try using ..
(2020-07-12, 01:21 PM).m. Wrote: [ -> ]are you sure that localhost can be used as database server name ..
'localhost', '127.0.0.1' and my server IP doesn't work.

(2020-07-12, 01:21 PM).m. Wrote: [ -> ]some servers do not allow using root as the database user 
can you create another user, grant all privileges & try using ..
It's a dedicated server BTW.

[Image: CmaLBCl.png]
^ so have you tried using mybb_user as the database username & it still didn't work ?
(2020-07-12, 02:03 PM).m. Wrote: [ -> ]^ so have you tried using mybb_user as the database username & it still didn't work ?
Yup, still not working - same error.
What's the authentication plugin for the two users btw?
(2020-07-12, 02:39 PM)noyle Wrote: [ -> ]What's the authentication plugin for the two users btw?
What you mean?
Looks to me rights have been granted on 'db1' - not the 'mybb_database'.  Unless just testing the grant privilege, and you did it elsewhere.

cheers...
In some Linux distros, MySQL uses auth_socket as default authentication plugin. That means for the user root on MySQL, you have to log in to MySQL as root under the same Linux user root, just like how you did in your first post.

As for the other user mybb_user, neither if the authentication plugin of it permits password login nor if the correct database privileges are granted for it (refer to @nixer55's reply) is unknown to us.

This random answer to the problem about root login might help: https://stackoverflow.com/a/42742610/6681141 and perhaps you may need to review the configurations for user mybb_user.
Pages: 1 2