c4onastick Posted July 27, 2006 Share Posted July 27, 2006 Hi,I've installed MySql on my server, it worked once, then the mysqld daemon doesn't want to run anymore.If I run it I get this message:me@localhost:# Starting mysqld daemon with databases from /var/lib/mysqlSTOPPING server from pid file /var/run/mysql/mysql.pid060726 23:30:58 mysqld endedThe error log has this in it:060726 23:22:09 mysqld started060726 23:22:09 InnoDB: Database was not shut down normally!InnoDB: Starting crash recovery.InnoDB: Reading tablespace information from the .ibd files...InnoDB: Restoring possible half-written data pages from the doublewriteInnoDB: buffer...060726 23:22:09 InnoDB: Starting log scan based on checkpoint atInnoDB: log sequence number 0 43809.InnoDB: Doing recovery: scanned up to log sequence number 0 43842InnoDB: Last MySQL binlog file position 0 79, file name ./mysql-bin.000006060726 23:22:09 InnoDB: Flushing modified pages from the buffer pool...060726 23:22:09 InnoDB: Started; log sequence number 0 43842060726 23:22:09 [ERROR] Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist060726 23:22:09 mysqld endedAny thoughts? I've been all over the internet trying to find an answer. Any help would be greatly appreciated. I'm running Slackware 10.2. And I have tried running the mysql_install_db script to no avail.Thanks. Quote Link to comment Share on other sites More sharing options...
fenway Posted July 27, 2006 Share Posted July 27, 2006 Are you sure the data dir path is correct? Otherwise, that's very bad. Quote Link to comment Share on other sites More sharing options...
c4onastick Posted July 27, 2006 Author Share Posted July 27, 2006 Yes, I recompiled and reinstalled after I had this problem for a bit. It should be /usr/local/mysql (somthing like that). Does datadir=/xxx/xxx need to appear in my.cnf in the [mysqld] section? (I tried defining basedir=/xxx/xxx, which didn't help). I noticed that the error code [2002] is not listed in MySqlFreaks Error listing... Quote Link to comment Share on other sites More sharing options...
fenway Posted July 27, 2006 Share Posted July 27, 2006 Somewhere there, yes. Quote Link to comment Share on other sites More sharing options...
c4onastick Posted July 27, 2006 Author Share Posted July 27, 2006 Thanks, I'll give that a shot. Quote Link to comment Share on other sites More sharing options...
c4onastick Posted July 28, 2006 Author Share Posted July 28, 2006 Ok, I wrestled with it yesterday. I ended up recompiling & reinstalling again for a fresh slate. ./mysqld_safe works fine. But, for some odd reason the rc.mysqld daemon isn't reading any of the changes I make in /etc/my.cnf. I added the datadir=/xxx/xxx to my.cnf. But still got the same error, I'm wondering if that datadir needs to be at the top of the [mysqld] section, it really shouldn't matter, but that's the way they have it on dev.mysql.org/doc/. I did, however, sucsessfully start the daemon using the actual daemon in /usr/libexec using the --datadir=/xxx/xxx option. Any other thoughts? I'm hoping all it takes is to move datadir=/xxx/xxx to the top of the [mysqld] section, but its a dim ray of hope in the vast darkness that is my current installation.To sum up:/usr/libexec/mysqld --datadir=/xxx/xxx Works fine/etc/rc.d/rc.mysqld startDoesn't work, same error. Trying to load databases from /var/lib or somthing similar.Thanks. Quote Link to comment Share on other sites More sharing options...
fenway Posted July 29, 2006 Share Posted July 29, 2006 Very strange... I'm all out of ideas; the [mysqld] section is definitely correct, though. Quote Link to comment Share on other sites More sharing options...
c4onastick Posted July 29, 2006 Author Share Posted July 29, 2006 Ah-Ha! I found the problem. In my rc.mysqld script, the --datadir=/xxx/xxx was set to /var/xxx. I manually set it to the correct directory. I suppose I could remove it also to have it take the settings from my.cnf.If you have this problem with Slackware (I think its because Slackware ships with a version of MySQL already) you must manually remove the --datadir=/xxx/xxx option in the rc.mysqld script or set it to the appropriate directory.Thanks for your help, you got me rolling down the right path. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.