Find the answer to your Linux question:
Results 1 to 4 of 4
I just recently migrated a Windows 2003 Server (Apache 2.0.50, PHP 5, and MySQL 4) to Fedora Core 2 and everything worked like a charm for 5 consecutive days, and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2004
    Location
    North Carolina
    Posts
    28

    MySQL 4.x runs until server reboot


    I just recently migrated a Windows 2003 Server (Apache 2.0.50, PHP 5, and MySQL 4) to Fedora Core 2 and everything worked like a charm for 5 consecutive days, and then I had to reboot. On startup, apachectl start carried out just fine, but mysqld_safe --user=mysql tried to start the MySQL server and immediately ended.

    I did a netstat -atop and then killed the mysqld process id as well as going into the process manager gui and killing the mysqld_safe that failed.

    I have removed and recompiled and installed mysql again with the same issue. Is anyone else having this issue? What did YOU do?

  2. #2
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    You need to look in your "<hostname>.err" file (normally in the mysql DATA directory), to see WHY mysqld failed to start - then fix the problem.

    Something that is confusing is your talking about it not starting, then your talking about having to go kill a process? If it failed to start there wouldnt be any processes running.

    Lastly, take at look at this page which i've always found to be helpful in the past:
    http://dev.mysql.com/doc/mysql/en/Starting_server.html

    J

  3. #3
    Just Joined!
    Join Date
    Aug 2004
    Location
    North Carolina
    Posts
    28

    error log

    This is command line:

    Code:
    &#91;root@HDTEST bin&#93;# ./mysqld_safe --user=mysql
    Starting mysqld daemon with databases from /usr/local/mysql/var
    040907 16&#58;00&#58;22  mysqld ended
    
    &#91;root@HDTEST bin&#93;#
    This is the error log thereafter:

    Code:
    040907 16&#58;00&#58;20  mysqld started
    040907 16&#58;00&#58;20  InnoDB&#58; Started
    040907 16&#58;00&#58;20  Fatal error&#58; Can't open privilege tables&#58; Can't find file&#58; './mysql/host.frm' &#40;errno&#58; 13&#41;
    040907 16&#58;00&#58;20  Aborting
    
    040907 16&#58;00&#58;20  InnoDB&#58; Starting shutdown...
    040907 16&#58;00&#58;22  InnoDB&#58; Shutdown completed
    040907 16&#58;00&#58;22  /usr/local/mysql/libexec/mysqld&#58; Shutdown Complete
    
    040907 16&#58;00&#58;22  mysqld ended

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284

    Re: error log

    Quote Originally Posted by cvia7503
    Code:
    040907 16&#58;00&#58;20  Fatal error&#58; Can't open privilege tables&#58; Can't find file&#58; './mysql/host.frm' &#40;errno&#58; 13&#41;
    If your error log file has something like:

    Can't find file: './mysql/host.frm' (errno: 13)

    , and you've tried setting
    --datadir=/path/to/my/data/directory but you
    still get the same error, it may be because the
    databases installed in the mysql data directory
    (usually /var/lib/mysql) are not owned by the
    mysql daemon, but by the user who ran
    mysql_install_db. chown them to mysql and chgrp
    them to the appropriate group e.g.

    chown -R mysql /var/lib/mysql/mysql
    chgrp -R daemons /var/lib/mysql/mysql

    Try starting mysqld like:

    cd /usr/local/mysql
    ./bin/safe_mysqld --user=mysql --datadir=/path/to/mysql/data

Posting Permissions

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