I am trying to use MySQL in a Docker container on a PFC200 (750-8217) to manage a database stored on an SD card (758-879/000-001). Following advice on this thread, I have been able to successfully launch the MySQL server in a Docker container on the PFC200 when the database is stored in flash memory. Unfortunately, attempts to do the same with the database stored on the SD card have failed. The MySQL server continually restarts and does not seem to be able to write to the SD card. Looking at permissions, I see that these are set to rwxrwxr-x and attempts to chmod 777 have no effect. If this is a permissions issue, then my inability to alter permissions suggests to me that there is a config file I should adjust, but I am not sure where to look. Any advice very gratefully received.
Have you followed this step in order to locate Docker ressources on the SD card ?
If yes, there might be a problem with the SD card itself. Is it an industrial grade like WAGO SD card ?
Try formatting it first, in ext4 (explained in the procedure below).
Once it’s all set, I would recommand to reboot the PFC before doing the Docker container installation. Sometimes the SD card is not mounted properly directly after the change.
Also take a look to your container logs.
2 Likes
It turns out that the problem I was having was because the SD card was FAT formatted. Following the suggestion by @quenorha I realised that the format needs to be in Ext4 (to allow permissions to be assigned). This resolved my problem.
1 Like