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:
- Shutdown mysql
- copied the data files
- Double checked and fixed as needed the permissions
- edited the my.cnf to point at the new data location
- edited the apparmour mysql cnf
- (the part I forgot) restart apparmour
- 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.
{ 1 comment… read it below or add one }
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