Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

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

Questions related to installing, updating, setting up and configuring
totoro
Posts: 19
Joined: Sun Aug 08, 2021 12:01 pm
nuBuilder Version: 4.5

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

Unread post 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.
kev1n
nuBuilder Team
Posts: 3801
Joined: Sun Oct 14, 2018 6:43 pm
nuBuilder Version: 4.5
Has thanked: 2 times
Been thanked: 9 times
Contact:

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

Unread post 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.
Attachments
test_connection.zip
(566 Bytes) Downloaded 104 times
totoro
Posts: 19
Joined: Sun Aug 08, 2021 12:01 pm
nuBuilder Version: 4.5

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

Unread post 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.
kev1n
nuBuilder Team
Posts: 3801
Joined: Sun Oct 14, 2018 6:43 pm
nuBuilder Version: 4.5
Has thanked: 2 times
Been thanked: 9 times
Contact:

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

Unread post by kev1n »

What if you remove include("nuconfig.php"); in the file?
totoro
Posts: 19
Joined: Sun Aug 08, 2021 12:01 pm
nuBuilder Version: 4.5

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

Unread post 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.
kev1n
nuBuilder Team
Posts: 3801
Joined: Sun Oct 14, 2018 6:43 pm
nuBuilder Version: 4.5
Has thanked: 2 times
Been thanked: 9 times
Contact:

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

Unread post by kev1n »

Could you ask for support in a Synology forum?
If test_connection.php fails it is not an nuBuilder issue.
totoro
Posts: 19
Joined: Sun Aug 08, 2021 12:01 pm
nuBuilder Version: 4.5

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

Unread post 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.
kev1n
nuBuilder Team
Posts: 3801
Joined: Sun Oct 14, 2018 6:43 pm
nuBuilder Version: 4.5
Has thanked: 2 times
Been thanked: 9 times
Contact:

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

Unread post 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?
totoro
Posts: 19
Joined: Sun Aug 08, 2021 12:01 pm
nuBuilder Version: 4.5

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

Unread post 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.
Attachments
login.png
login.png (37.33 KiB) Viewed 1993 times
kev1n
nuBuilder Team
Posts: 3801
Joined: Sun Oct 14, 2018 6:43 pm
nuBuilder Version: 4.5
Has thanked: 2 times
Been thanked: 9 times
Contact:

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

Unread post by kev1n »

Are there any details in the apache error logs?
Post Reply