SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Jan 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Binary Logging stopping mysql start

    I'm new to mysql and after getting installed and working successfully on Linux I wanted to add in a backup solution to protect my data.

    I know how to backup a database using the command mysqldump, but I wanted to add in binary logging, so I can get my database back to exactly where it was if something goes pear shaped.

    If I add this to my.cnf file

    [mysqld]
    log-bin=/usr/local/mysql/logs/update

    and restart mysql I get the following errors in the localhost.err file in the data directory:

    060116 13:35:03 mysqld started
    /usr/local/mysql/bin/mysqld: Can't read dir of '/root/tmp/' (Errcode: 13)
    /usr/local/mysql/bin/mysqld: File '/usr/local/mysql/logs/update.index' not found (Errcode: 13)
    060116 13:35:03 [ERROR] Aborting

    060116 13:35:03 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

    060116 13:35:03 mysqld ended

    I scoured the Internet looking for a solution and so far I'm coming up blank, can some one please please help?

  2. #2
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    does the directory /usr/local/mysql/logs/ exist? it must be writeable by the user that mysql runs under because mysql will create file in that directory.

    it looks like you're trying to run mysql under the root account. this is a bad idea. see http://dev.mysql.com/doc/refman/5.0/...ysql-user.html

  3. #3
    SitePoint Member
    Join Date
    Jan 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've narrowed the problem down to running mysql as user mysql, but both the /root/usr/ and /usr/local/mysql/logs/ directory both belonged to root. I changed the /usr/local/mysql/logs directory to be owned by mysql.

    I don't want to change /root/tmp/ as it will intefere with other applications.

    Does anyone know how to tell mysql to set the socket needed for binary-logging to be in another directory other than /root/temp/ in the my.cnf file?

  4. #4
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    does that error only show up when you try to turn on binary logging?

  5. #5
    SitePoint Member
    Join Date
    Jan 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes it all works fine without binary logging. Soon as I turn it on I get errors.

  6. #6
    SitePoint Member
    Join Date
    Jan 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It turned out to be a bug in MySql when being run on Mandrake 10 (which I am running).

    For a full explanation of the bug and how to fix it follow this link:

    http://bugs.mysql.com/bug.php?id=5822

  7. #7
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    very nice. do how did you fix it? using a different shell, or by specifying the temp directory as a command line option?

  8. #8
    SitePoint Member
    Join Date
    Jan 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I made sure /root/tmp had the right rw access and then used the following two commands:

    export TMPDIR=/tmp
    echo $TMPDIR

    the echo showed that TMPDIR was set to /root/tmp where mysql was trying to right the socket for binary logging. After that it worked even after restarting the machine. It booted with Mysql running with binary logging turned on.


Bookmarks

Posting Permissions

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