moving mysql data

by Administrator on June 11, 2009

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.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

{ 1 comment… read it below or add one }

Eric Hammond June 12, 2009 at 2:15 am

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

Previous post:

Next post: