Unable to login to mysql after the fireware update - mysqli::real_connect(): (HY000/2002): Connection refused

When I open phpmyadmin to login to root account I get this error
mysqli::real_connect(): (HY000/2002): Connection refused

I try to reset root password using this script

python3 /usr/bin/mysql_reset.py -r

But I get this error

root@WDMyCloudMirror ~ # python3 /usr/bin/mysql_reset.py -r
killall: mysqld: no process killed
killall: mysqld_safe: no process killed
killall: mariadbd: no process killed
killall: mariadbd-safe: no process killed
231031 22:37:03 mysqld_safe Logging to ‘/mnt/HD_a4/.@database@/WDMyCloudMirror.err’.
231031 22:37:04 mysqld_safe Starting mariadbd daemon with databases from /mnt/HD_a4/.@database@
Traceback (most recent call last):
File “/usr/bin/mysql_reset.py”, line 748, in
reset_root_account()
File “/usr/bin/mysql_reset.py”, line 585, in reset_root_account
if not _get_datadir_from_process_list():
File “/usr/bin/mysql_reset.py”, line 72, in _get_datadir_from_process_list
datadir = output.decode().strip().split(“/usr/libexec/mariadbd”)[1].split(“–datadir=”)[1].split(" ")[0]
IndexError: list index out of range
root@WDMyCloudMirror ~ #

it is

i get this erro

Following command didnt show anything

  • pidof mariadbd;

I already run this but i did try again

  • python3 /usr/bin/mysql_reset.py --reboot

It didn’t work still same issue

pidof mariadbd still show nothing

I have lot of files on this NAS, Will this remove all files

Update firmware but still same issue

It looks like sql starts and then crash it

You can see from above screen. It runs and find no sql is running

this command try to run it but nothing happens

  • python3 /usr/bin/mysql_reset.py --reset

I have, also updated phpmyadmin and login again but same issue. I think it’s an issue with new firmware

2 Likes

Anything else I can do to fix this issue

This command didnt return anything

  • pidof mariadbd

I also done system restore

Still same issue, Cant login

Is it possible to completely remove sql and reinstall it again

Yes, the WD support answered.
Here you can see how to remove mysql.

The last post is NO SOLUTION.
Meanwhile I tried almost everything.
I cannot get phpmyadmin available.
It is installed (for the x-th time), but it is always the same - no access with the root / admin or whatsoever passwort (or even no passwort).