Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2000

    mysql on secondary drive

    I'm trying to set up a new server with mysql on the secondary drive. I've done this with several servers before, but it's not working with this one. Once I point to the new drive, mysql won't start. I'm wondering if mysql 4 has something to do with it, because that's the only difference I can find. The error message made me think it was a permissions problem, but the permissions and ownership match my other servers so I don't know what's wrong.

    Here's what I've tried...

    In /etc/my.conf, I set the datadir to /home2/mysql. I leave the sock file in /var/lib/mysql -- When I stop/start mysql to test the new configuration, I get this error message:
    Failed to start database :
    Initializing MySQL database: Installing all prepared tables
    050415 19:26:02 [Warning] Can't create test file /home2/mysql/adz.lower-test
    /usr/libexec/mysqld: Can't change dir to '/home2/mysql/' (Errcode: 13)
    050415 19:26:02 [ERROR] Aborting

    050415 19:26:02 [Note] /usr/libexec/mysqld: Shutdown complete

    Installation of system tables failed!

    Examine the logs in /home2/mysql for more information.
    You can also try to start the mysqld daemon with:
    /usr/libexec/mysqld --skip-grant &
    You can use the command line tool
    /usr/bin/mysql to connect to the mysql
    database and look at the grant tables:

    shell> /usr/bin/mysql -u root mysql
    mysql> show tables

    Try 'mysqld --help' if you have problems with paths. Using --log
    gives you a log in /home2/mysql that may be helpful.

    The latest information about MySQL is available on the web at
    Please consult the MySQL manual section: 'Problems running mysql_install_db',
    and the manual section that describes problems on your OS.
    Another information source is the MySQL email archive.
    Please check all of the above before mailing us!
    And if you do mail us, you MUST use the /usr/bin/mysqlbug script!
    It creates the mysql and test directory, but the tables and other files are not created.

    I also tried a symlink from /var/lib/mysql --> /home2/mysql, but mysql fails to start after I do this. I've never been successful in using the symlink method. On all my other servers, I use my.conf to specify the data directory.

    If you have any ideas, I would appreciate it.

  2. #2
    Join Date
    Dec 2000
    After searching google for answers, I came across this post that describes the problem exactly:

    This person ended up installing mysql from a download from instead of the RH distribution, and it finally worked. I'm afraid I'll screw something up, so if anyone has other ideas about what the problem could be, please share. It seems I have done everything the way I should have, but this version of mysql doesn't like the datadir to be moved...

    The version that came with RH is 4.1.10

  3. #3
    Join Date
    Dec 2000
    THIS IS A BUG!!! I wasted hours trying to figure out what I did wrong, when that was not the problem at all.

    4.1.10 does like having the datadir moved. I have not found a fix yet, but I've found more info on it.

Posting Permissions

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