Jump to content


Photo

[SOLVED] MySql installation help


  • Please log in to reply
7 replies to this topic

#1 c4onastick

c4onastick
  • Members
  • PipPipPip
  • Advanced Member
  • 216 posts

Posted 27 July 2006 - 05:32 AM

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.

Regex Tester::Unicode Regex::PHP Function List::MySQL 5.1
"Sorry sweetheart... but this all day sucker is down to the soggy white stick." -- Topper Harley

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 27 July 2006 - 03:43 PM

Are you sure the data dir path is correct? Otherwise, that's very bad.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#3 c4onastick

c4onastick
  • Members
  • PipPipPip
  • Advanced Member
  • 216 posts

Posted 27 July 2006 - 05:00 PM

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...
Regex Tester::Unicode Regex::PHP Function List::MySQL 5.1
"Sorry sweetheart... but this all day sucker is down to the soggy white stick." -- Topper Harley

#4 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 27 July 2006 - 07:03 PM

Somewhere there, yes.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#5 c4onastick

c4onastick
  • Members
  • PipPipPip
  • Advanced Member
  • 216 posts

Posted 27 July 2006 - 07:06 PM

Thanks, I'll give that a shot.
Regex Tester::Unicode Regex::PHP Function List::MySQL 5.1
"Sorry sweetheart... but this all day sucker is down to the soggy white stick." -- Topper Harley

#6 c4onastick

c4onastick
  • Members
  • PipPipPip
  • Advanced Member
  • 216 posts

Posted 28 July 2006 - 05:13 PM

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.
Regex Tester::Unicode Regex::PHP Function List::MySQL 5.1
"Sorry sweetheart... but this all day sucker is down to the soggy white stick." -- Topper Harley

#7 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 29 July 2006 - 03:12 PM

Very strange... I'm all out of ideas; the [mysqld] section is definitely correct, though.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#8 c4onastick

c4onastick
  • Members
  • PipPipPip
  • Advanced Member
  • 216 posts

Posted 29 July 2006 - 10:28 PM

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.
Regex Tester::Unicode Regex::PHP Function List::MySQL 5.1
"Sorry sweetheart... but this all day sucker is down to the soggy white stick." -- Topper Harley




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users