Server Build Exercises on AWS (Amazon Web Services) 2022 edition

MySQL8のクライアントをインストール

cd appendix/rdbms/mysql8-client/scripts/

sh install.sh

このスクリプトが何をしているのか?というと、次のとおりです

  • 念のためデフォルトの mariadb ライブラリを削除し
  • yumにMySQLリポジトリを追加して8.0だけを有効化
  • MySQL8のクライアントをインストール

MySQLとつながるか?

mysql -u root -h 127.0.0.1 -p

を実行するとパスワードを聞かれるのでMySQLサーバで指定した値を入力してください

無事に接続されれば、以下のように表示されます

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.27 MySQL Community Server - GPL

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

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>プロンプトにshow databases;と入力してENTERを押してください。 次のように表示されればOKです(この例ではtestデータベースが作成済ですね)

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
| test               |
+--------------------+
5 rows in set (0.00 sec)
Last updated on 25 Nov 2021
Published on 25 Nov 2021
Copyright (C) 2021-2022 Ken'ichi Fukamachi, All rights reserved. CC BY-NC-SA 4.0
We appreciate AWS Academy Japan for the offer of the learning environment.

Powered by Hugo. Theme by TechDoc. Designed by Thingsym.