Windows7(64bit)にMySQL5.5(64bit)をインストール


Windows7(64bit)にMySQL5.5(64bit)をインストール!
Apacheが32bit、PHPも32bitなので32bit版入れようかなと思ったけど、DBなら関係ないはずなので64bit版を入れてみた。





まずはダウンロード!
  1. MySQL公式ダウンロードサイトへアクセス
  2. 画面左の「MySQL Community Server」を選択
  3. Windows (x86, 64-bit), MSI Installer 5.5.17 32.6M」の「Download」選択
  4.  今回は勉強用なのでリスクの高い最新版にした。本来は要件に合わせて32bit/5.1系などを検討すべし。

  5. MySQLのユーザー登録を求められる。適当に登録。個人の勉強用なのでcompanyはnoって入れた。
  6.  登録済みの場合は登録時のメアドにパスワードを受け取れるでそれを入力。

  7. 登録後すぐにミラーサイトの選択になるので、日本の中からどれか選ぶ。


mysql-5.5.17-winx64.msiインストール
  1. completeで入れました。インストール自体はすぐ終わります。
  2.  途中Windows7UACがポップするのでぽちっとしてあげる必要があります。

  3. 広告は[Next][Next][Next]!

  4. インストール終了時「Launch the MySQL Instance Configuration Wizard」にチェックを入れてFinish
  5.  「MySQL Instance Configuration Wizard」が別ダイアログで起動します。

  6. 「Detailed Configuration」選択→[Next]
  7. 「Developer Machine」選択→[Next]
  8. 「Multifunctional Database」選択→[Next]
  9. InnoDBのデータファイルのインストールパスはそのままで[Next]
  10. Please set the approximate number of concurrent connections to the Server.
  11.  「Decision support(DSS)/OLAP」選択、[Next]

  12. Please set the networking options
  13.   Enable TCP/IP Networking チェックON (Default)
      Port Number 3306 (Default)
      Add firewall exception for this port チェックON
      Enable Strict Mode チェックON (Default)

  14. Please select the default character set
  15.   「Best support For Multilingualism」(UTF-8)を選択して[Next]

  16. Please set the Windows options
  17.   「Install as Windows Service」チェックON (Default)
      Service Nameは「MySQL」 (Default)
     「Launch the MySQL Server automatically」チェックON (Default)
     「Include Bin Directory in Windows PATH」チェックON
     ※MySQLをアンインスコしてサービスが残っている場合ここで[Next]押下時にエラーが出ます。こんなメッセージ↓
      『A Windows service with the name MySQL already exists. Please uninstall this service correctly
      or choose a different name for the new service』
    

  18. Please set the security options.
  19.   「Modify Security Settings」チェックON (Default)
      「New root password」ルートパスワード(任意)を入力
      「Confirm」もう一度ルートパスワードを入力
      「Enable root access from remote machines」チェックON
      「Create An Anonymouse Account」チェックOFF (Default)

  20. Ready to execute
  21.   ラジオボタンみたいなのが4つ表示されるが、押せない(笑)
      無視して[Execute]。実行するとラジオボタンにチェックが付いていきます。(あ、そういう役割?みたいな)
      my.iniのインストールパスが表示されるので変なところに作られていないか確認
       ※全然関係の無いフォルダに作られたりすることがあるそうです
       C:\Program Files\MySQL\MySQL Server 5.5\my.ini (これなら問題なし)
    

コマンドプロンプトからテスト
  1. コマンドプロンプトを開き、「mysql -u root -p」でmysqlへアクセスします。
  2.  パスワードはインストール中に指定したrootパスワードを入力。
     ↓こんなログが表示されれば成功です。
    

    C:\Users\YasuharuLabo>mysql -u root -p
    Enter password: **************
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 3
    Server version: 5.5.17 MySQL Community Server (GPL)
    
    Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
    
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    mysql>

この記事の続き

MySQL徹底入門 第3版 ~5.5新機能対応~

MySQL徹底入門 第3版 ~5.5新機能対応~