Unable to connect to mysql after the upgrade

Hi, I upgraded my cloud drive to os 5 and now I cant connect to mysql remotely on my local network.
my cloud ip:

my kodi ip:

I have install the mysql app on cloud and created all users but still getting same issue

GRANT ALL ON . TO user IDENTIFIED BY ‘your_password’;

restart the box few times

I have seen the same problem on PR4100 after OS5 upgrade. I don’t have a solution, but I understand the problem. Maybe WD can help? (or someone who knows the Linux internals of the box better)

The PR4100 is using MariaDB as the mysql server. Like you, I had to re-add my kodi user but it still did not work.

The MariaDB has my.cnf configuration file (/etc/my.cnf) which has a bind_address of which is the default “loopback” address which means the sql server is not accessible from the outside world (i.e. the kodi client)

The config file needs to be set to the NAS IP address (i.e. your.nas.ip.address) in order to accept connections from the outside world.

I was able to ssh in and change this file (and with Linux shenanigans restart MariaDB so the change took effect)… and the Kodi library started working again, so I know that this is the root of the problem.

Unfortunately, when you restart the PR4100, the my.cnf config file gets overwritten with the loopback address and thus shuts off access. So without a manual “restart of the sql server with the bind address fixed”… it locks itself down and prevents kodi (or any) outside connection.

Ya my config file has same ip address and what I read online it say that you should set this to or comment out the line.

What command did you use to stop/start/restart mysql service.

All of the commend I use dont work.

@lalajee Check out the following post from @arg20

I actually did a ps to look at running services and killed the mysql process, and then restarted which worked, but may have had unintended side effects as perhaps there were expected optional parameters needed by other systems when restarting the server.

The command below is a better approach but I haven’t tried it, and I can’t recall the exact sequence without going through it again. I am just not at my pc right now.

edit /etc/my.cnf to change to
restart the mysql server by doing: python3 /usr/bin/mysql_reset.py --reboot

(edit relinked to correct post)

This works, Thank you
It reset it when NAS is reboot. which I do everyday.

I’m going to try this to create a startup script and change the file before sql server start.