Page 1 of 3

"Access denied for user" on MariaDB 10 on Synology NAS

Posted: Sun Aug 08, 2021 12:15 pm
by totoro
I have a Synology NAS where nuBuilder Forte has been running for years without issue using MariaDB 5. Recently, however, DSM 7 has been released which drops support for MariaDB 5 and leaves only MariaDB 10. I migrated my database to MariaDB 10, made sure that the same user with the appropriate password exists in the new DB but nuBuilder produces this error when I try to access it:
Connection failed: SQLSTATE[HY000] [1045] Access denied for user 'films'@'localhost' (using password: YES)
If I switch back to MariaDB 5 without changing anything, it works perfectly again. Switch to MariaDB 10 - does not work again, and so forth.

I can even login to phpMyAdmin using this user (films) and browse the database configured for it.

Maybe someone with an experience in this area could give an advise regarding the appropriate configuration? I'm not a database expert and could be missing something completely obvious. Or might forget some non-obvious tweak which I applied years ago for MariaDB 5 and not for MariaDB 10.

Re: "Access denied for user" on MariaDB 10 on Synology NAS

Posted: Sun Aug 08, 2021 1:08 pm
by kev1n
Hi,

Could it be a port issue?

Can you try with the attached test_connection.php file if a connection can be established?
Unzip and copy it to nubuilder's root directory and replace YOUR_DB etc. with your db details.

Re: "Access denied for user" on MariaDB 10 on Synology NAS

Posted: Sun Aug 08, 2021 2:08 pm
by totoro
Here's what I got:
Error!: SQLSTATE[HY000] [2002] No such file or directory
As for a port issue, I actually had one before the current problem. I got a "connection refused" error until I adjusted the MariaDB 10 port to be the same as it was for MariaDB 5. After that I started encountering the current problem. If I change the port again, I start running into "connection refused" again.

Re: "Access denied for user" on MariaDB 10 on Synology NAS

Posted: Sun Aug 08, 2021 2:51 pm
by kev1n
What if you remove include("nuconfig.php"); in the file?

Re: "Access denied for user" on MariaDB 10 on Synology NAS

Posted: Sun Aug 08, 2021 3:46 pm
by totoro
No effect. Apparently the message is generated by the line
echo "Error!: " . $e->getMessage() . "<br/>";
while the include is outside of the try block.

Re: "Access denied for user" on MariaDB 10 on Synology NAS

Posted: Sun Aug 08, 2021 4:19 pm
by kev1n
Could you ask for support in a Synology forum?
If test_connection.php fails it is not an nuBuilder issue.

Re: "Access denied for user" on MariaDB 10 on Synology NAS

Posted: Sun Aug 08, 2021 4:55 pm
by totoro
I've replaced "localhost" with "127.0.0.1" and now it produces this:
syt_title: Browse
So the connection is apparently working? And the credentials appear to be correct but somehow get refused when using nuBuilder itself.

Re: "Access denied for user" on MariaDB 10 on Synology NAS

Posted: Sun Aug 08, 2021 5:28 pm
by kev1n
Could you repkace the line in nudatabase.php

Code: Select all

$pdo = new PDO("mysql:host=$nuConfigDBHost;dbname=$nuConfigDBName", $nuConfigDBUser, $nuConfigDBPassword);
with the one in test_connection.php and test again?

Re: "Access denied for user" on MariaDB 10 on Synology NAS

Posted: Sun Aug 08, 2021 8:11 pm
by totoro
All right, now we're definitely getting somewhere! I've replaced the line and got the login screen!

But now I cannot login to the app with any user credentials I had configured for it. It just displays an empty tooltip (attached a screenshot of that) so I don't really know what's wrong.

Re: "Access denied for user" on MariaDB 10 on Synology NAS

Posted: Sun Aug 08, 2021 8:41 pm
by kev1n
Are there any details in the apache error logs?