Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MySQL won't start anymore

Status
Not open for further replies.

rebelinababylon

Instructor
Mar 9, 2004
2
BE
I installed Apache, PHP and MySQL on a Win98SE-system and everythin ran fine.

On shutting down my system, I never explicitally stopped MySQL. When I try starting it now (c:\mysql\bin\mysqld --console), I get:

"Fatal error: Can't open privilege tables: table 'mysql.host' doesn't exist"

The .err-file has an entry like this for every time I used MySQL before:

040221 23:26:50 InnoDB: Database was not shut down normally.
InnoDB: Starting recovery from log files...
InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 43892
InnoDB: Doing recovery: scanned up to log sequence number 0 43892
040221 23:26:51 InnoDB: Flushing modified pages from the buffer pool...
040221 23:26:51 InnoDB: Started
C:\MYSQL\BIN\MYSQLD.EXE: ready for connections.
Version: '4.0.18-max-debug' socket: '' port: 3306

Only now suddenly, recovering from log files seems to fail and I get these in my .err-file:

040308 22:21:20 InnoDB: Started
040308 22:21:20 Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist
040308 22:21:20 Aborting

040308 22:21:20 InnoDB: Starting shutdown...
040308 22:21:22 InnoDB: Shutdown completed
040308 22:21:22 C:\MYSQL\BIN\MYSQLD.EXE: Shutdown Complete

What do I have to do to get MySQL running again? I wouldn't mind losing all the databases I constructed so far, I just started anyway.

Thanks!
 
go to the c:\mysql\data\mysql directory and run,

c:\mysql\bin\myisamchk -e *.MYI > report.txt

and look through the report.txt file for errors.
Then run,

myisamchk -r <tablename>

on any table the report says has an error.

If that doesn't work, just reinstall MySQL.
 
Thanks! I reinstalled MySQL already in the meantime, but your post tought me some new stuff anyway. Wow, look at all those commands in the /mysql/bin directory!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top