MySQL-5.5.8-win32 のインストール時に「Error Nr. 1364」というエラーが出る。

 


↑のApply security settings の部分で以下のようなエラーが出る。

The security settings could not be applied to the database because the connection has failed with the following error.



Error Nr. 1364

Field ‘authentication_string’ doesn’t have a default value



If a personal firewall is running on your machine, please make sure you have opened the TCP port 3306 for connections. Otherwise no client application can connect to the server. After you have opened the port please press [Retry] to apply the security settings.



If you are re-installing after you just uninstalled the MySQL server please note that the data directory was not removed automatically. Therefore the old password from your last installation is still needed to connect to the server. In this case please select skip now and re-run the Configuration Wizard from the start menu.

文面通り、ファイヤウォールに正しく穴を開けても、ファイヤウォールを停止しても、だめ。

んでよくよくエラー文を調べてみると・・・

「authentication_string」なる場所にNULLデータを書き込もうとしてエラーが出ているんじゃねぇか?と気付くわけだ。

そこで、↓のサイトを参考に、「my.ini」を修正する。

「レコード挿入時の #1364 – Field doesn’t have a default value」

http://pentan.info/sql/mysql/strict_mode.html

sql-mode=”STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION”

この部分の「STRICT_TRANS_TABLES」を消す。つまり・・・

sql-mode=”NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION”

とする。また、設定ファイルを変更したあとには必ずMySQLを再起動すること。

ただし気をつけないといけないことがある。



この「MySQL Instance Configuration Wizard」だが、どうやら「my.ini」を書き換える処理をしているらしい。

そこで、この↓のエラーダイアログを出したまま、「my.ini」を書き換えて、同じくエラーダイアログを出したまま、MySQLサービスを再起動してみる。



そうしたら問題解決。

だが、そもそもこのエラーがなぜでているのか?

‘authentication_string’ なるものに何を書き込む必要があるのか?

はっきりわかっていないので、継続調査が必要である。






追記 By 2011/3/20

arc殿曰く

http://awoni.net/personal-site/mysql

によると



注意:現在最新のバージョンである 5.5.8 では「Enable root access from remote machines」にチェックをするとインストールの最後で Error Nr. 1364 「Field ‘authentication-string’ doesn’t have a default value」というエラーが発生するので、チェックをしないようにしてください。



とのことです

5.5.9でも同様でした。

との事。
arc殿、感謝です。

コメントする

メールアドレスが公開されることはありません。 が付いている欄は必須項目です