Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to use of symbolic link for change path database in mysql.
I create a Directory ,then create a symbolic link to this directory but when I want to use of this database get following error:

ERROR 1018 (HY000): Can't read dir of './depot/' (errno: 13)

I disabled apparmor but not working.

I checked No Problem of Permission.

share|improve this question

To fix this problem you need to set correct permission on /var/lib/mysql/dbname/ directory. Use the command as follows:

cd /var/lib/mysql/

ls -l

chown mysql:mysql dbname/ -R

Replace dbname with actual database directory name. Now you can connect to your mysql server:

mysql -u user -p dbname -e 'show tables;'
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.