(初心者向け)MySQLをインストールする方法

当ページのリンクには広告が含まれています。
目次

はじめに

今回はMySQLのインストール方法を説明していこうと思います。

自分はMySQLのインストール自体は今回が初で、手順を載せているサイトをもとに行いましたが、バージョンによって表示される画面や選択するものが少し違いがあるようです。

あと、事前にVisualStudioをインストールしておきましょう。

VisualStudioのインストールがまだの人は良ければ、自分の記事を参考に見てもらえればと思います(;^_^

これをしてないと途中でエラーが出ます。そのエラーについても後で書きます。

公式サイトへ

ではまず、以下サイトにアクセスして「community」をクリックします。

「web community」ではないので注意してくださいね!

画面が以下のように切り替わるので、下側にあるリンクの文字「No thanks, just start my download.」をクリック

インストーラーがページの左下にダウンロードされますので、完了したら開いて起動します。

(見つからない方は、PCのエクスプローラーからダウンロードを確認すると「mysql-installer-community-8.0.20.0」というようなものが入っていると思うので、クリックして起動してください)

インストール作業

起動すると以下のような画面が表示されます。ので「Developer Default」を選択し、nextをクリックします。

次の画面では以下のような画面が表示されます。これは何か要件を満たしていないため、インストールできない製品がありますよと知らせてくれていて、「Requirement」の欄に足りないものが記載されているので、必要に応じて準備をしてください!

問題がなければ、nextをクリックします。

次の画面では、操作としてはMySQLを動かすためのランタイムのインストールを行います。「Execute」をクリックすれば自動で行ってくれます。すでにインストール済みの場合は、以下の画面のように聞いてきますが、「YES」または「はい」を選択すればOKです。

次の画面では以下のように表示され、MySQL本体のインストールを開始します。何かたくさん並んでいますが気にせずに「execute」をクリックして開始します。

インストールが始まるとこんな感じです(^^♪

完了すると以下のような画面になります。ので「next」をクリックします。

次に以下のような画面になり、セットアップを要求されます。デフォルトで問題ないですが、表示されているポート番号をすでに他のアプリケーションで使用している場合は変更する必要があります。使用していないポート番号であればそのまま「next」クリックします。

ここでクリック後にエラー出た人は後半に書いている内容を参考にしてみてください!

次の画面では以下のように表示されます。MySQL InnoDB Clusterを 利用するかどうかの選択らしいです。今回は普通に単独で MySQL を利用しますので Standalone MySQL Server/Classic MySQL Replication を選択し、「next」をクリックします。

次の画面では以下のように表示されます。コンフィギュレーションタイプと MySQL との通信に関する設定画面です。コンフィギュレーションタイプは Development Computer 、 Server Computer 、 Dedicated Computer の3つから選択できますが、今回は開発用に使用するので Development Computer を選択しますので、特に操作せずデフォルトのまま「next」をクリックします。

MySQL ver8 ではアカウント認証でより安全な暗号化パスワードの方式が利用可能となっているようです。インストール後に設定で以前の認証方式設定可能らしいので、新しい方式の Use Strong Password Encryption for Authentication を選択し、「next」をクリックします。

次の画面では以下のように表示されます。root アカウントのパスワードの設定画面です。管理者アカウントである root アカウントのパスワードを設定し、確認のために2か所に同じパスワードを入力します。入力が終わったら「next」をクリックします。(今回自分はrootと設定)

次の画面では、以下のように表示されます。MySQLをWindowsの「サービス」に加えるか否かを設定します。

Configure MySQL Server as a Windows Service」にチェックを入れたままにすると、MySQLをWindowsのサービスに加えることができます。

また、「Windows Service Name」に入力した名前がサービスに表示される名前になるため、変更したい方は変更してください。(今回は「MySQL80」のまま、変更せず進めます)問題なければ「next」をクリックします。

次の画面が最終確認画面です。「Execute」をクリックします。

インストール完了したら「finish」をクリックします。

また、次の画面では以下のように表示されます。 MySQL Router やサンプルをインストールしている場合は続いて他の製品の初期設定をします。最初に MySQL Router の設定です。「next」をクリックします。

次の画面では以下のように表示されます。MySQL Router の設定画面が表示されています。今回は特に設定をしないので「finish」をクリックします。

次の画面では以下のように表示されます。最後にサンプルの設定になります。「next」をクリックします。

 次の画面では以下のように表示されます。 MySQL をインストールした時に設定した root ユーザーのパスワードを入力し「check」をクリックします。

クリックすると以下のように確認が取れるので、「next」をクリックします。

次の画面では以下のように表示されます。確認画面なので、問題なければ「execute」をクリックします。

以下の画面が表示されれば初期設定は完了です。「finish」をクリックします。

以下の画面が表示されるので、これですべてのインストールが完了です。「next」をクリックします。

次の画面で以下のように表示されれば初期設定も完了ですので「finish」をクリックします。

そして、以下の2つの画面が出るかもですが気にせず×で閉じます。

お疲れさまでした!以上でインストールは完了です!

もし確認する場合は、Windowsであれば左下の検索フォームで「サービス」と入力するとアプリの一覧がでるので、そこに設定したサービス名が表示されていればOKだと思います。(今回の場合であれば、「MySQL80」と表示されていればOK)

VisualStudioインストールしてないから?(エラーの話)

手順のポート番号の確認をしてるあたりで途中で、以下のようなエラーが表示された場合ですが、

エラーのダイアログの「OK」をクリックして、進めていたインストール作業を中断するために「cancel」してMySQLのインストーラを終了します。

そのあと、PCのエクスプローラー/ダウンロードにあるMySQLのインストーラーを削除してください。(削除せずに中断して、VisualStudioインストール後に、再起動して行いましたが、同じエラーが出るので、一度削除しないといけないようです)

では、以下の内容でVisualStudioをインストールしてみてください。

このあとに、もう一度MySQLのサイトへ行き、初めからインストールの手順を行ってみてください。

詳しい理由はよくわからないですが、以下のサイトの内容からすると、要件を満たしていないとインストールされない製品の中で、MySQLの設定上必要なものがVisualStudioを入れていないとインストールされない為?なのかもしれないです。

(翻訳してみるとVisualStudioをインストールすると解決する的なことが書いてあります)

“No compatible server found” error came while installing mysql in windows 7

https://translate.google.com/translate?hl=ja&sl=en&u=https://stackoverflow.com/questions/47921093/no-compatible-server-found-error-came-while-installing-mysql-in-windows-7&prev=search

おわりに

今回はMySQLのインストール方法を説明しました。

自分は途中でエラーが出てヒヤッとしましたが、どうにか解決できました!また記事に書きますが、「HeidiSQL」というツールをインストールすると、PHPMyAdminみたいにマウス操作でテーブルを作成したり、消したりできるもので便利なので、おすすめです(^^)

追記(2020/08/20):HeidiSQLのインストール方法を記事にしたので、宜しければ以下の記事を見てみてください!(^^)/

今回参考にしたサイトを載せておきます!

プロエンジニア - フリーランスIT...
MySQLのダウンロード&インストールと初期設定方法 - プロエンジニア フリーランスITエンジニア専門の案件紹介・転職支援エージェント【プロエンジニア】
あわせて読みたい
【画像で解説】?MySQL5.7のインストールとセットアップ MySQL5.7の準備 前回までは、PHP7についてセットアップを行ってきました。今回はMySQL5.7のインストールをしていきます。 ■MySQL5.7のダウンロード ダウンロードは次のサイ...
Let'sプログラミング
MySQL Community Serverのインストール MySQL Community Server をインストールする手順、および初期設定について解説します。今回は Windows10(64bit) の環境にインストールを行います。インストールが完了する...

ではまた!

よかったらシェアしてね!
  • URLをコピーしました!
  • URLをコピーしました!

コメント

コメント一覧 (47件)

  • Way cool! Some very valid points! I appreciate you penning this write-up plus the rest of the website is extremely good. Nananne Falkner Haakon Kathryn Fabio Jarlathus

  • thank you for reading
    Updates are irregular, but please come read again 🙂

  • Helpful information. Lucky me I found your site by accident, and I am shocked why this coincidence did not happened in advance! I bookmarked it. Billi Nichols Rexanna

  • I have read so many posts concerning the blogger lovers but this paragraph is truly a good article, keep it up. Gabriel Luce Tiffi

  • Oh my goodness! an impressive post dude. Thanks Nevertheless I am experiencing issue with ur rss. Don?t understand why Incapable to subscribe to it. Exists any person getting similar rss trouble? Anybody who knows kindly react. Thnkx Alberta Jerrold Hadik

  • It is in reality a nice and useful piece of information. I am glad that you shared this useful information with us. Please stay us up to date like this. Thank you for sharing. Maressa Rockwell Akeylah

  • Thank you for the auspicious writeup. It in fact was a amusement account it. Look advanced to more added agreeable from you! However, how can we communicate?| Rosa Abbie Odysseus

  • Good post! We are linking to this particularly great post on our site. Keep up the great writing. Hedy Johnathan Chiquia

  • Pretty! This has been an extremely wonderful post. Many thanks for providing these details. Mitzi Ambrosius Gilbye

  • I needed to post you that little bit of word to finally thank you so much the moment again relating to the striking thoughts you have shared on this site. This has been simply tremendously open-handed with you to present unreservedly what most people would have sold for an electronic book to help with making some profit on their own, primarily seeing that you might well have tried it in the event you wanted. Those techniques likewise worked to become a great way to recognize that someone else have the same passion similar to my very own to see somewhat more with regard to this problem. I know there are some more pleasurable situations up front for people who see your website. Benni Baxy Ancilin

  • You need to be a part of a contest for one of the best blogs online. I will recommend this blog! Emmalee Gothart Urien

  • Hello there. I found your website by the use of Google at the same time as searching for a related subject, your website got here up. It looks great. I have bookmarked it in my google bookmarks to come back then. Josefina Marven Tess

  • Hurrah! At last I got a web site from where I be capable of truly take valuable data concerning my study and knowledge. Deborah Thorn Yovonnda

  • I was excited to find this page. I need to to thank you for ones time due to this fantastic read!! I definitely appreciated every little bit of it and I have you bookmarked to look at new information in your web site. Kalindi Keefer Nataline

  • Thanks on your marvelous posting! I really enjoyed reading it, you can be a great author. I will be sure to bookmark your blog and will eventually come back in the future. I want to encourage one to continue your great job, have a nice afternoon! Brittaney Clywd Pisarik

  • This paragraph presents clear idea for the new viewers of blogging, that truly how to do running a blog. Roseanne Kelbee Tychonn

  • Thanks for sharing superb informations. Your web site is so cool. I am impressed by the details that you have on this blog. It reveals how nicely you understand this subject. Bookmarked this web page, will come back for more articles. You, my friend, ROCK! I found simply the info I already searched all over the place and just could not come across. What a perfect website. Fanchon Davon Oakley

  • Hello can i ask , f i can avail the reviewer , can you please contact me in case , thank you Rebeka Syd Noman

  • You made a few nice points there. I did a search on the theme and found the majority of folks will consent with your blog. Lauryn Vittorio Atalanti Jorry Jules Meave

  • I have recently started a website, the information you provide on this website has helped me greatly. Thank you for all of your time & work. Gena Gail Urania

  • Amazing! Its genuinely amazing post, I have got much clear idea regarding from this paragraph. Gizela Cchaddie Claud

  • Way cool! Some extremely valid points! I appreciate you penning this post and also the rest of the website is very good. Lurline Hugh Yam

目次