I'm trying to move my mysql data files to another folder. So far, I have:
- cp'ed all folders (not files) from /var/lib/mysql to /my/new/path
- chown (recursively) /my/new/path to mysql:mysql
- corrected entries in /etc/apparmor.d/usr.sbin.mysqld (two lines)
- corrected datadir in /etc/mysql/my.cnf
- service apparmor restart, service mysql restart
And still, the /var/log/mysql/error.log says it can't create the /my/new/path/manisto-desktop.pid. What am I missing here? By the way, I'm running Ubuntu 10.10.
EDIT: The exact error is:
[ERROR] /usr/sbin/mysqld: Can't create/write to file '/my/new/path/manisto-desktop.pid' (Errcode: 13)