Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/ 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/' (Errcode: 13)
share|improve this question

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .