Jump to content

[SOLVED] MySql installation help


c4onastick

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.