moving mysql data

I was moving the location of the mysql databases on my Ubuntu EC2 instance to an EBS volume. I had a little trouble. Small problem, but eventually found the solution. Did the normal things:
  1. Shutdown mysql
  2. copied the data files
  3. Double checked and fixed as needed the permissions
  4. edited the my.cnf to point at the new data location
  5. edited the apparmour mysql cnf
  6. (the part I forgot) restart apparmour
  7. then start up mysql server
I had edited all the proper files. Poured over the permissions. Read the syslog a million times wondering why mysql couldn't write the file. Finally restarted the apparmour service and voila! Mysql started up without a hitch.
Eric Hammond06/12/2009 07:15

I've updated the EBS+MySQL tutorial to use a slightly different approach which is simpler and works without changing AppArmor config: http://ec2ebs-mysql.notlong.com

Leave a comment
We don't share this.