1

To have more room for databases, I copied /var/lib/mysql to /media/usb/mysql

To copy them, I had to change their owner and group, so they are now showing

/var/lib/mysql shows 755 mysql:mysql /media/usb/mysql shows 755 pi:pi

I changed the datatdir in /etc/mysql/my.cnf

Rebooted and restarted mysql service.

Job for mysql.service failed. See 'systemctl status mysql.service' and 'journalctl -xn' for details. journalctl -xn shows "No journal files were found."

systemctl status mysql.service shows --- â mysql.service - LSB: Start and stop the mysql database server daemon Loaded: loaded (/etc/init.d/mysql) Active: failed (Result: exit-code) since Thu 2016-11-24 09:29:27 GMT; 45s ago Process: 1635 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)

the mysql service starts OK if I change datatdir in /etc/mysql/my.cnf back to /var/lib/mysql

Does /media/usb/mysql pi:pi need to be mysql:mysql?

I've tried CHOWN in various ways but it always comes back with 'Operation not permitted' - even under 'SUDO -i'

I'm stuck now, any advice much appreciated. Thank you.

  • Your USB stick most likely is FAT32 formatted. FAT filesystems do not support user/group settings nor do they support the usual access rights settings. You have to reformat the stick with a filesystem which does or put all the data you need into a filesystem-in-a-file and mount that one. – Janka Nov 24 '16 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.