Results 1 to 13 of 13
  1. #1
    Join Date
    Nov 2003
    Posts
    7

    Unanswered: 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

  2. #2
    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.

  3. #3
    Join Date
    Nov 2003
    Posts
    7
    Nope, no luck with that.

    Any other ideas?

  4. #4
    Join Date
    Sep 2002
    Location
    Montreal, Canada
    Posts
    224
    Provided Answers: 1
    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?

  5. #5
    Join Date
    Nov 2003
    Posts
    7
    no, should there be one there?

  6. #6
    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.

  7. #7
    Join Date
    Nov 2003
    Posts
    7
    Tried all of that already and got nothing!

    What could this be....

  8. #8
    Join Date
    Nov 2003
    Posts
    91
    You should have a MySQL error log at
    c:\mysql\data\<machine_name>.err

    What does it say?

  9. #9
    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.....

  10. #10
    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)

  11. #11
    Join Date
    Nov 2003
    Posts
    7
    is there a way to create this table?

    I have alrady tried reinstalling MySQL.

  12. #12
    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 Attached Files

  13. #13
    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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •