I'm using mysql 5.5 on an ubuntu linux server. I need to move a database from its current location (under /var/lib/mysql) to a disk with more space, so I attempted to move the directory and create a symlink to the new location. When I do this, I get
ERROR 1018 (HY000): Can't read dir of './<dbname>/' (errno: 13)
when I attempt to show tables
after starting mysql again. The error goes away if I move the database directory back to its original location. (But, I need to move to a larger disk, so I've got to figure this out somehow)
I've looked around on this site and google; The documentation and the accepted answer to this question indicates what I'm doing should work (I'm attempting to use option 3 from the accepted answer).
So, is this still supported? If so, what am I doing wrong?
Here's some additional information to jumpstart things:
- when I run
ls -lL /var/lib/mysql
all the files are owned by mysql (user & group) - I've also changed ownership of the actual symlink to mysql:mysql (due to comments on this question)
- Both filesystems are on local disks (ext4)