Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2004
    Posts
    1,226

    mysql on second drive

    hello

    I'm running MySQL on a secondary drive, but I'm having this problem:

    mysql> drop database user_DB;
    ERROR 6: Error on delete of './user_DB/table.MYI' (Errcode: 13)
    as far as I could find, it is related to file system permissions, but everything seens to be fine...
    the mysql datadir is /mnt/disk2/var/lib/mysql/ and here are the permissions

    on /:
    drwxr-xr-x 6 root root 4096 Dec 12 20:25 mnt/

    on /mnt:
    drwxr-xr-x 8 root root 4096 May 28 01:37 disk2/

    on /mnt/disk2:
    drwxr-xr-x 7 root root 4096 Mar 16 22:38 var/

    on /mnt/disk2/var:
    drwxr-xr-x 4 root root 4096 May 28 01:38 lib/

    on /mnt/disk2/var/lib:
    drwxr-x--x 304 mysql root 8192 May 28 01:58 mysql/

    on /mnt/disk2/var/lib/mysql:
    drwxrwx--- 2 user mysql 4096 May 26 00:54 user_DB/

    on /mnt/disk2/var/lib/mysq/user_DB:
    -rwxrwx--- 1 user mysql 8826 Feb 17 2004 table.frm*
    -rwxrwx--- 1 user mysql 100 May 26 2004 table.MYD*
    -rwxrwx--- 1 user mysql 3072 May 28 01:53 table.MYI*

    any ideas?

    thanks

  2. #2
    Join Date
    Jul 2001
    Location
    Singapore
    Posts
    1,790
    Which OS is that?
    Giam Teck Choon
    :: Join choon.net Community today to share your tips and tricks on server issues please ::
    :: Singapore Dedicated Servers :: Singapore Virtual Private Servers :: Linux/FreeBSD Server Management ::

  3. #3
    Join Date
    Feb 2004
    Posts
    1,226
    linux with cPanel

  4. #4
    If you want to drop the database, you just need to delete the folder user_DB from /mnt/disk2/var/lib/mysql.

  5. #5
    Join Date
    Sep 2002
    Location
    Top Secret
    Posts
    11,687
    Errorcode 13 is mysql's permission error. Ensure that all of the files under this directory are owned by mysql:mysql, and are u+rw.
    Since you've got it mounted on a second drive, ensure also that this mount point is owned by mysql:mysql as well, and that there is (at minimum) a symlink in /var/lib/mysql (which is where redhat, and most *ix servers install mysql by default) to your real hard drive or partition.
    WHMCS Guru - WHMCS addons, management, support and more.
    WHMCS Notifications Extended - Add slack, hipchat, SMS, pushover to WHMCS !!
    Always looking for Linux, WHMCS, Support Desk work. PM for details

  6. #6
    Join Date
    Feb 2004
    Posts
    1,226
    Originally posted by linux-tech
    Errorcode 13 is mysql's permission error. Ensure that all of the files under this directory are owned by mysql:mysql, and are u+rw.
    Since you've got it mounted on a second drive, ensure also that this mount point is owned by mysql:mysql as well, and that there is (at minimum) a symlink in /var/lib/mysql (which is where redhat, and most *ix servers install mysql by default) to your real hard drive or partition.
    I listed all the permissions... they looks like ok

  7. #7
    Join Date
    Feb 2004
    Posts
    1,226
    fixed
    the problem was the permission of the symlink on /var/lib/mysql


    thanks

Posting Permissions

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