VistaにMySQLをインストール
MySQLのインストールの話。
壁が高すぎる。
まずは、PHP 5.3.0が出たその4でMySQLをインストールして、Vistaでサービス削除で設定の準備が出来たのでMySQL Server Instance Configuration Wizardで設定しました。
すると、以前×になっていたStart serviceのセクションは無事通過したものの、サービスの起動に失敗した、みたいなエラーが出た。
「サービス」を見てみるとすでにMySQLサービスは起動しているようなので、再度Wizardを起動してみるとStart serviceは通過したものの、以下のエラーメッセージが出た。(長い。コピー出来てよかった)
The security settings could not be applied to the database because the connection has failed with the following error.
Error Nr. 1045
Access denied for user ‘root’@'localhost’ (using password: YES)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.
一応Firewallを確認してみたら、開いていないっぽいし、XAMPPの設定が残っていたので一応削除して、プログラムを追加したり、TCP3306番を空けてみたり、Firewallをoffにしてretryしてみたのですが同じエラーが出ます。
しょうがないのでSkipして設定終了させます。
以前LinuxにMySQLを入れたときに、root@localhostの設定で色々苦労した覚えがあったのでそれかもと思ってやってみた。
確か、root@localhostと、root@xxxxでパスワードをlocalhostに設定しないといけなかったとかそんな問題だったと思ったけど・・・。
一応MySQLのrootパスワード設定でやっていることをやってみまたらどうも当たりくさい。
MySQL Command Line Clientを起動するとパスワードを聞かれるので、まだ設定されてない今はパスワードなしでログイン出来る(はず)。
その後、以下コマンドを発行します。(パスワードはpassにとりあえずしています)
Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 22 Server version: 5.1.36-community MySQL Community Server (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> set password for root@localhost=password('pass'); Query OK, 0 rows affected (0.00 sec) mysql>
そしてもう一度MySQL Command Line Clientを起動して先ほど設定したpassを入力するとログイン出来るはず。ログイン出来た。
とりあえず今日はここまで。