1

I am trying to create a schema.

But I am getting this error :

mysql> create schema myBase;
ERROR 13 (HY000): Can't get stat of './myBase' (Errcode: 13 -
Permission denied)

When I do a ls -l on /var/lib I am getting :

drw-rw-rw- 8 mysql         mysql         4096 juin   6 14:41 mysql

I don't know what is wrong here.
I anyone knows..

1
  • 1
    13 means OS permissions issue and it seem execute permission is missing. what are the permissions at datadir level? as create schema would create directory so make sure mysql process user at os can create directories at OS Jun 6, 2016 at 13:19

1 Answer 1

0

You also need to have execute otherwise you cannot "CD" into the directory nor MySQL will be able to.

Run this to fix directories recursively:

for dir in $(find /var/lib/mysql -type d); do chmod u+x $dir; done

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.