mysql はじめてのインストールから

 

まとめ

インストールからデータベース利用の解説・問題まで

 

1)ORACLEアカウント作成、mysqlページでログイン

MySQL :: MySQL Downloadsへ行く。

2)インストール(Macの場合Macを選択)

参考:

www.dbonline.jp

 

3)ダウンロードしたファイル(Download File内)を開く

mysql-5.6.24-osx10.8-x86_64.pkg という名前のファイルをクリックすると、インストールのための画面が出てきます。

4)インストールの方法を辿ってインストールする

5) Settingへ行き、mySQLを探す

f:id:haruokny:20150505121723p:plain

 

6)下の写真のようになっていない場合、Activate MySQL Serverを選ぶ

f:id:haruokny:20150505121718p:plain

 

7)mysqlの起動をする

試しにここで mysql -u username などとコマンドを打つと、

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 4

Server version: 5.6.24 MySQL Community Server (GPL)

Copyright (c) 2000, 2015, 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>

 

などと出る。

 7)設定

参考リンク:

qiita.com

www.yukun.info

 

8)データベースなどの解説(無料)参考までに

gci.t.u-tokyo.ac.jp

 

 

参考:ダウンロードなどがされていない時にmysqlコマンドを打ってしまうとき

エラー文面:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

 

Online resources: