Jump to content

Archived

This topic is now archived and is closed to further replies.

c4onastick

[SOLVED] MySql installation help

Recommended Posts

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/mysql
STOPPING server from pid file /var/run/mysql/mysql.pid
060726 23:30:58  mysqld ended

The error log has this in it:

060726 23:22:09  mysqld started
060726 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 doublewrite
InnoDB: buffer...
060726 23:22:09  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 43809.
InnoDB: Doing recovery: scanned up to log sequence number 0 43842
InnoDB: Last MySQL binlog file position 0 79, file name ./mysql-bin.000006
060726 23:22:09  InnoDB: Flushing modified pages from the buffer pool...
060726 23:22:09  InnoDB: Started; log sequence number 0 43842
060726 23:22:09 [ERROR] Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist
060726 23:22:09  mysqld ended

Any 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.

Share this post


Link to post
Share on other sites
Are you sure the data dir path is correct? Otherwise, that's very bad.

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
Somewhere there, yes.

Share this post


Link to post
Share on other sites
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 start

Doesn't work, same error. Trying to load databases from /var/lib or somthing similar.

Thanks.

Share this post


Link to post
Share on other sites
Very strange... I'm all out of ideas; the [mysqld] section is definitely correct, though.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.