Upgrade to OS 5 broke MySQL connection

I can’t believe they don’t enable remote access to the DB. This broke my build. It makes no sense, why would I mount phpmyadmin only for apps running locally? does anybody know a way to rollback OS 5?

Same problem messed up my local database. Worst firmwareupgrade ever. I’m afraid there is no way back to OS3. phpmyadmin config is broken aswell since everytime i login (root) using the link via ex2 config i get kicked back to the phpmyadmin login screen when trying to click any option (e.g. status, settings, databases,…) :face_with_symbols_over_mouth:
If there wont be a fix until black friday i try to get another nas (qnap, synology,…)

all I’ve managed to do is:

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

But this only lasts until my nas loses power. If you reboot your nas it won’t work anymore and you need to do it again. I’m not sure on how to fix this since the filesystem mounted is on ram (if you look at the output of: mount)

1 Like

That is so helpful, GREAT THANKS

Isn’t there any way to automate this process?

I couldn’t find any. I’m a developer but not super knowledgeable on linux commands. I think that the root is mounted on ram from something in the internal nas memory but I don’t know exactly how to access that or where to find it and I don’t have the time to dig deeper into it.

The problem is that any solution to get around these issues revolves around scripting in fixes that get reverted on a reboot or power loss.

I’ve had issues with this in the past when it came to keeping my NAS connected through a VPN, and there’s no real way to automate it as the filesystem is completely flashed back to default every time on boot and loaded back in fresh without the scripts running.

There’s no real way to automate restarting of the scripts on boot that I’ve found so far.

@htb The issue is not that phpMyAdmin cannot support remote access. The issue is that the database server itself cannot be accessed by clients. Which makes the NAS unusable for media server applications, especially with Kodi clients using the NAS as the mysql server.

1 Like

WD made the right call to close down external access to internal management DB

For those in need of an MySQL server, you can always run a second instance on another port.
Either by simply using the builtin daemon binary with your own config, or you can get a more recent version via Docker or Entware (both available in Community Developed Apps - WD Community).
All you need to do is adjust the listen address and port.
The docker / entware routes are persistent over reboots.

Based on Docker and Docker
Create docker-compose.yml somewhere on a persistent location.

# Use root/example as user/password credentials
version: '3.1'

services:

  db:
    image: mysql
    command: --default-authentication-plugin=mysql_native_password
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: example
    ports:
      - 3307:3306

  phpmyadmin:
    image: phpmyadmin
    restart: always
    ports:
      - 8080:80

Then run

docker-compose up -d

Bamn. 2 steps, without turning your NAS into a honeypot.
Welcome to 2020.

No its absolutely impossible to revert back to OS3 :face_with_symbols_over_mouth:My Cloud OS 3 to My Cloud OS 5 FAQ

Yes I feel you I’m effing done with WD. Poor rollout of OS5, bad engineering lousy customer service. They’ve become a terrible company. I’ll be switching to Synology. OS5 rollout so poor and destructive, I'm switching brands to Synology after much research

1 Like

@Tfl Except that Docker isn’t installed in the new OS/5…

If anyone is still in warranty then keep putting pressure on WD to send you a new device as OS5 is not letting you have the same functions as os3 so it’s useless to some people or even limited.

It looks like that WD start to hate customers. I’m very upset about OS5 I loose mysql, the device is always turning around while doing indexing and creating nasyty previews I never used before.

So as shame on teh WD Product Owner. My next device is home build, sorry guys I nearly 30 years in that *nix business so I can do that, or I by a better product from an other company.

I personally am looking at turning my PR4100 into either OpenMediaVault or FreeNAS. There is a nice tutorial in the forums about using FreeNAS on the 4100.

Daryl

Thanks for your help. You can easily add a crontab to exeute this commands:
Type in command line:

  • crontab -e
    add following lines:
    @reboot echo “[mysqld] bind-address=0.0.0.0” > /etc/my.cnf
    @reboot python3 /usr/bin/mysql_reset.py --reboot

This means, after the reboot this two commands will be executed. I hope this will help you.

Unfortunately, these changes won’t persist after reboot. The crontab is copied over from a persistent store.

Looks like they finally fixed the issue… firmware 5.10.122
Accessing MySQL from outside of network : In today’s firmware 5.10.122, we have removed the restriction of restriction of accessing MySQL only from localhost. User can enable Network Database (MySQL) for remote access from the web configuration dashboard under Network Services. Please refer to this KBA .

Just looking around and found again another problem after had so many with a PR2100 and the update to cycloid 5. I had a power loop without the PR2100 was accessible on the lan, for weeks as they said it was doing diagnostic… then after so long I had a replacement and I sent my PR2100 with the hds (that had to be out in the replacement) and after some time I got a brand new PR2100 but with new hds, mine were thrown away on their process of recondition… this I just discovered week after they did, when I received the parcel. other weeks to try to find them somewhere (in spain laboratory in Ontígola, well nothing to do… I wanted give the new pr2100 back! and after a week I tried to see if it was again an hw to use, so I spent time to set up and several things happened… a bay usb 3.1 with 4 hd, attached usb to the PR2100… some hds have been corrupted and I also discovered this phpadmin that does not work and probably so many others you all have had…
I will take the 2 8TB hds and will make a tomb for the PR2100. and I will post this happening all over I could, because some strategies made from some of their white guys, have been closing the doors to freedom, and I will never more trust in such firms out there, just pushed of tech, but sipped, for make money and decide the use we could do. really going to use parts and assembling what it will work forever! shame on you WD!

In new firmware Update this has been fix

Go to Settings → Networks → change Network Database to “On With remote access”