Take the 2-minute tour ×
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. It's 100% free, no registration required.

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
add comment

1 Answer

up vote 1 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
add comment

Your Answer

 
discard

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.