Thursday, February 19, 2009

[搬移] mysql error when using symlink to share databases

搬移自 http://sskaje.spaces.live.com/blog/cns!CD0E835D6C568521!1349.entry
January 07, 2009


working under ubuntu.
just wanna make mysql databases created under m$win can be used.
1st, fstab, just to mount the partition automatically
2nd, symlink, #/var/lib/mysql, do 'ln -s /media/App/Server/MySQL/MySQL\ Server\ 5.1/data/forum forum'
3rd, restart mysql.
vbb reports a fatal error; when using mysql client, show tables would report an error like '
mysql> show tables;
ERROR 1018 (HY000): Can't read dir of './forum/' (errno: 13)
'

why ?

iv already chown mysql\: to that directory.

er...

apparmor...

check the /etc/apparmor.d/usr.sbin.mysqld, add some lines to make that directory readable/writable to mysqld.

No comments:

Post a Comment