Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2004
    Posts
    44

    Can't create database 'database'. (errno: 13)' SOLUTION

    i tryed to search here but didnt find usefull info, so just for the record

    if you get this error
    Can't create database 'database'. (errno: 13)'
    or #1006 - Can't create database (errno: 13)'

    happens probably due to Permission denied by MySQL.

    less /etc/group
    and then less /etc/passwd
    finf mysql user and group name, probably both are named mysql

    change to mysql dir, probably var/lib/mysql and then type cd .. to go a dir under.

    chown -R mysql:mysql ./mysql/

    replace mysql:mysql with something different if you group and user privileges are called diferenty

    also try chmod 755 on mysql dir

  2. #2

    Thumbs up Worked for me, thanks.

    Quote Originally Posted by zekoslav View Post
    if you get this error
    Can't create database 'database'. (errno: 13)'
    or #1006 - Can't create database (errno: 13)'

    happens probably due to Permission denied by MySQL.

    less /etc/group
    and then less /etc/passwd
    finf mysql user and group name, probably both are named mysql

    change to mysql dir, probably var/lib/mysql and then type cd .. to go a dir under.

    chown -R mysql:mysql ./mysql/
    Thanks zekoslav, I had this problem and your solution worked.
    A little less confusing (I think under meant above) (# is the superuser prompt):

    After checking /etc/group and /etc/password as explained above,
    change to the directory above the mysql dir, probably var/lib/:
    # cd /var/lib

    Check the owner and group with
    # ls -ld mysql

    # chown -R mysql:mysql mysql
    -z.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •