If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Windows 2000 - mysqld not starting

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-20-03, 11:17
untitled88 untitled88 is offline
Registered User
 
Join Date: Nov 2003
Posts: 7
Windows 2000 - mysqld not starting

I've been trying to get MySQL working properly on my win 2000 machine for a few days now but I keep getting this problem...

...Upon startup or whenever I manually try to start the service it'll start for about 4 seconds and then stop again, no error messages, nothing.

MySQL is installed at the default C:\mysql\ and i've run mysqlcc which created the ini file.

The strange thing is, after the first restart of the computer after the installation everything is fine. I even used phpMyAdmin to transfer my databases. However the second time I restart, it just won't work!

What could be causing this? Please help!

Thanks

-Chris
Reply With Quote
  #2 (permalink)  
Old 11-20-03, 13:52
vanekl vanekl is offline
Registered User
 
Join Date: Nov 2003
Posts: 91
It could be the my.ini file itself.
I would rename the my.ini file to something like my.ini.old
and then try to restart mysql.
If that didn't solve the problem, then go back to the my.ini
file and comment out all the lines that might cause trouble.
(Comment lines by putting a '#' in the first column of the line.)
I think there are only two lines in the ini file that have to be there:
basedir and datadir.
Reply With Quote
  #3 (permalink)  
Old 11-20-03, 14:01
untitled88 untitled88 is offline
Registered User
 
Join Date: Nov 2003
Posts: 7
Nope, no luck with that.

Any other ideas?
Reply With Quote
  #4 (permalink)  
Old 11-20-03, 14:17
bstjean bstjean is offline
Registered User
 
Join Date: Sep 2002
Location: Montreal, Canada
Posts: 219
Quote:
Originally posted by untitled88
Nope, no luck with that.

Any other ideas?
Do you have a my.cnf in the root directory of your C drive?
Reply With Quote
  #5 (permalink)  
Old 11-20-03, 14:19
untitled88 untitled88 is offline
Registered User
 
Join Date: Nov 2003
Posts: 7
no, should there be one there?
Reply With Quote
  #6 (permalink)  
Old 11-20-03, 14:27
vanekl vanekl is offline
Registered User
 
Join Date: Nov 2003
Posts: 91
You could look to see if it was installed as a service.
On my machine (Win XP), services are at
Control Panel -> Administrative Tools -> Computer Management -> Services and Applications -> Services.
(MySQL should automatically have been installed as a service
so you don't have to start it manually.)

You should find the 'MySQL' service listed.
Select its properties. Its startup type is probably set to
automatic, and its status is probably stopped.
I know this sounds a little wonky, but my number one
rule for fixing wacky computers is to reboot. See
if Windows is able to start mysql as a service by rebooting.
Then open task manager and look for process 'mysqld-nt.exe'
on the Processes tab, and check the MySQL service status
again. Then open Event Viewer and see if there are recent errors
in 'System'.

Another thing you could try is logging on as adminstrator
and try to start up mysql.

Another thing you could try is going to directory
c:\mysql\bin and double-clicking on winmysqladmin.exe.
Sometimes that is enough to get the daemon running.
Reply With Quote
  #7 (permalink)  
Old 11-20-03, 14:44
untitled88 untitled88 is offline
Registered User
 
Join Date: Nov 2003
Posts: 7
Tried all of that already and got nothing!

What could this be....
Reply With Quote
  #8 (permalink)  
Old 11-20-03, 14:57
vanekl vanekl is offline
Registered User
 
Join Date: Nov 2003
Posts: 91
You should have a MySQL error log at
c:\mysql\data\<machine_name>.err

What does it say?
Reply With Quote
  #9 (permalink)  
Old 11-20-03, 15:00
untitled88 untitled88 is offline
Registered User
 
Join Date: Nov 2003
Posts: 7
every time I try to start the service I get this:

031120 20:02:15 InnoDB: Started
031120 20:02:15 Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist
031120 20:02:15 Aborting

031120 20:02:15 InnoDB: Starting shutdown...
031120 20:02:17 InnoDB: Shutdown completed
031120 20:02:17 MySql: Shutdown Complete


I hope this helps.....
Reply With Quote
  #10 (permalink)  
Old 11-20-03, 15:12
vanekl vanekl is offline
Registered User
 
Join Date: Nov 2003
Posts: 91
What this means is you are missing one of the system
tables in the mysql database. This should have been created
for you automatically. My 'host' table is empty, but the
table exists. Your MySQL install is hosed.

Just for the record, this is the description of the 'host' table:
mysql> show tables;


+-----------------+
| Tables_in_mysql |
+-----------------+
| columns_priv |
| db |
| func |
| host |
| tables_priv |
| user |
+-----------------+
6 rows in set (0.00 sec)

mysql> select * from host;
Empty set (0.00 sec)

mysql> describe host;
+-----------------------+-----------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------------------+-----------------+------+-----+---------+-------+
| Host | char(60) binary | | PRI | | |
| Db | char(64) binary | | PRI | | |
| Select_priv | enum('N','Y') | | | N | |
| Insert_priv | enum('N','Y') | | | N | |
| Update_priv | enum('N','Y') | | | N | |
| Delete_priv | enum('N','Y') | | | N | |
| Create_priv | enum('N','Y') | | | N | |
| Drop_priv | enum('N','Y') | | | N | |
| Grant_priv | enum('N','Y') | | | N | |
| References_priv | enum('N','Y') | | | N | |
| Index_priv | enum('N','Y') | | | N | |
| Alter_priv | enum('N','Y') | | | N | |
| Create_tmp_table_priv | enum('N','Y') | | | N | |
| Lock_tables_priv | enum('N','Y') | | | N | |
+-----------------------+-----------------+------+-----+---------+-------+
14 rows in set (0.00 sec)
Reply With Quote
  #11 (permalink)  
Old 11-20-03, 15:15
untitled88 untitled88 is offline
Registered User
 
Join Date: Nov 2003
Posts: 7
is there a way to create this table?

I have alrady tried reinstalling MySQL.
Reply With Quote
  #12 (permalink)  
Old 11-20-03, 15:36
vanekl vanekl is offline
Registered User
 
Join Date: Nov 2003
Posts: 91
The MySQL system files are kept at
c:\mysql\data\mysql
There should be 18 files:

columns_priv.{frm,MYD,MYI}
db.{frm,MYD,MYI}
func.{frm,MYD,MYI}
host.{frm,MYD,MYI}
tables.{frm,MYD,MYI}
user.{frm,MYD,MYI}

There are all binary files, so you cannot create them
yourself with a text editor.

I don't think this will work, but I'm attaching my
host.{frm,MYD,MYI} files in the hope that you can
copy them into your data\mysql directory.

Note, unless you have the other 15 files you will just get
a similar error the next time you start the service.
Attached Files
File Type: zip host.zip (876 Bytes, 40 views)
Reply With Quote
  #13 (permalink)  
Old 11-20-03, 15:43
untitled88 untitled88 is offline
Registered User
 
Join Date: Nov 2003
Posts: 7
Red face

AAAARRRRGGGGHHHH!!!!

Well thanks! I realise what I've been doing!

Thinking the mysql db was a test db I deleted it with phpmyadmin every time i installed MySQL fresh.

Stupid Me!!!!!!

Thanks for the help anyway, i've learnt my lesson

I just copied the files from my old db server and it worked fine

Thanks!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On