++ MySQL 4.0.24 がなぜか起動しなくなった!? 原因と対策がわかった ++


2005.6.24初版

MySQL 4.0.24 がなぜか起動しなくなった!? 原因と対策がわかった

【 MySQL 4.0.24 がなぜか起動しなくなった!? 原因と対策がわかった 】
このトラブルにはたまげた。最悪再インストールまで考え脂汗がでてきた。
たまたまNOD32 をインストしたのでその影響か?と疑ったがどうも違うらしく、どうやらインストールディレクトリをデフォルトの C:\mysql 以外に変更した場合は、インストール後に設定ファイル my.ini を書き換える必要があるようだ。

C:\Program Files\MySQL\bin>mysqladmin -u root password XXXXXX
などを実行すると、次のエラーがでるようになってしまった!?・・・・なぜだろう?

ysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to MySQL server on 'localhost' (10061)'
Check that mysqld is running on localhost and that the port is 3306.
You can check this by doing 'telnet localhost 3306'

また他方、サービスで「Start」させてみてもエラーになり、その具体的な内容がわかる



このエラーでネットを検索してみた。
Error 1067: The process terminated unexpectedly




原因がわかった!!
ネットを検索して http://ftp.tas.gamepoint.com.au/pub/mysql/doc/mysql/ja/NT_start.html に手がかりがあった
my.ini ファイルを書き換えればなんとかなるかもしれない・・・?


    Posted by James on October 2 2003 12:44am
    [Delete] [Edit]

    I installed Version 4.0.15 of MySQL on my Windows XP operating system. Rather than install it in the standard C:\mysql\ directory, I installed it into C:\Program Files\mysql\.

    I too received the dreaded Error 1067 when I attempted to start the mysql service in the Control Panel on path C:/Program Files/mysql/bin/mysqld-nt.exe. The my.ini files created in the WINDOWS directory upon installation contained the following:

    [WinMySQLAdmin]                  <・・・・・・この2行を削除して、
    Server=C:/Program Files/mysql/bin/mysqld-nt.exe


    I deleted this and replaced it with:

    [mysqld]                    <・・・・これら3行に書き換える
    basedir=C:\Program Files\mysql\
    datadir=C:\Program Files\mysql\data


    I restarted the mysql service via the Control Panel, and it worked successfully.

    Upon restarting windows, the my.ini file contained:

    [mysqld]
    basedir=C:\Program Files\mysql\
    datadir=C:\Program Files\mysql\data
    [WinMySQLAdmin]
    Server=C:/Program Files/mysql/bin/mysqld-nt.exe

    Not sure why the last two lines have reappeared, but the new directory settings seem to be handling the change of base installation directory adequately.


上表のようにファイルを書き換えたあとで、
C:\Documents and Settings\Administrator.C32ND>cd "C:\Program Files\MySQL\bin"
C:\Program Files\MySQL\bin>mysqld-nt.exe

を実行してもなぜか MySQL が起動しなかった!?

そこで、上図のサービスで MySQL Properties の「Start」させるとなんなく起動した。
わからんとこがあるがとりあえず大成功である。

そのつぎは root のパスワードを設定する。
C:\Program Files\MySQL\bin>mysqladmin -u root password *******

目次へ
inserted by FC2 system