2

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.

4

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 !!!

1
  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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