Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. 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'm trying to create a database and when I type in CREATE DATABASE epik; I get the error ERROR 13 (HY000): Can't get stat of './epik' (Errcode: 13) I am running kubuntu 13.04 with mysql 5.5.31.

share|improve this question
up vote 3 down vote accepted

Errcode: 13 is a file permission issue.

If your datadir is /var/lib/mysql, do the following:

cd /var/lib/
ls -l

Check the file permissions as make sure /var/lib/mysql is owned by mysql:mysql.

If it is not, then do this:

chown -R mysql:mysql /var/lib/mysql

If you ran sudo, you are probably root. Make sure root can write into /var/lib/mysql

Give it a Try !!!

share|improve this answer
Fixed it! Thank you so much – Zach Russell May 21 '13 at 2:47
To clarify for future folks: I had to use sudo chown -R mysql:mysql /var/lib/mysql, otherwise I got permission changing rights errors. – khaverim Sep 6 '14 at 18:21

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.