Skip to Content
『MySQL ラーニングガイド 第2版』
book

『MySQL ラーニングガイド 第2版』

by Vinicius M. Grippa, Sergey Kuzmichev
March 2025
Intermediate to advanced
632 pages
11h 8m
Japanese
O'Reilly Media, Inc.
Content preview from 『MySQL ラーニングガイド 第2版』

第16章. その他のトピック

この作品はAIを使って翻訳されている。ご意見、ご感想をお待ちしている:translation-feedback@oreilly.com

この章の目的は、クエリやオーバーロードしたシステムのトラブルシューティング、あるいはさまざまな MySQL トポロジのセットアップにとどまらない。日々の作業を簡単にしたり、複雑な問題を調査したりするために利用できるツールの数々を紹介したい。MySQL Shell から始めよう。

MySQL シェル

MySQL Shellは、MySQL用の高度なクライアントおよびコードエディタである。 MySQL 5.6および5.7でほとんどのDBAが使用していた従来のMySQLクライアントの機能を拡張している。MySQL ShellはPython、JavaScript、SQLなどのプログラミング言語をサポートしている。また、APIコマンド構文を使用して関数を拡張することもできる。例えば、InnoDB Cluster を管理するスクリプトをカスタマイズすることができる。MySQL Shellからは、MySQLサンドボックスインスタンスの起動と設定もできる。

MySQL シェルをインストールする

サポートされているLinuxディストリビューションの場合、 MySQL Shellをインストールする最も簡単な方法は、MySQLのyumまたはaptリポジトリを使用することだ。UbuntuとCentOSにインストールする方法を見てみよう。

MySQL ShellをUbuntu 20.04 Focal Fossaにインストールする

UbuntuへのMySQL Shellのインストールは、通常のリポジトリに含まれているので比較的簡単だ。

まず、MySQLリポジトリを設定する必要がある。以下のコマンドを使って、aptリポジトリをサーバにダウンロードし、インストールすることができる:

# wget  https://dev.mysql.com/get/mysql-apt-config_0.8.16-1_all.deb
# dpkg -i mysql-apt-config_0.8.16-1_all.deb

インストールしたら、パッケージ情報を更新する:

# apt-get update

次に、install コマンドを実行して MySQL Shell をインストールする:

# apt-get install mysql-shell

コマンドラインを使ってMySQL Shellを起動できるようになった:

# mysqlsh
MySQL Shell 8.0.23

Copyright (c) 2016, 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 '\?' for help; '\quit' to exit.
 MySQL  JS >

CentOS 8にMySQL Shellをインストールする

CentOS 8にMySQL Shellをインストールするには、Ubuntuの場合と同じ手順( )を踏むが、まずCentOS8にあるデフォルトのMySQLパッケージが無効になっていることを確認する必要がある: ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

PostgreSQL: インストールと運用、第3版

PostgreSQL: インストールと運用、第3版

Regina O. Obe, Leo S. Hsu

Publisher Resources

ISBN: 9798341635395