Documentation Home
MySQL Shell 9.5
Download this Manual
PDF (US Ltr) - 2.5Mb
PDF (A4) - 2.5Mb


MySQL Shell 9.5  /  MySQL Shell Utilities

Chapter 12 MySQL Shell Utilities

MySQL Shell includes utilities for working with MySQL. To access the utilities from within MySQL Shell, use theutil global object, which is available in JavaScript and Python modes, but not SQL mode. Theutil global object provides the following functions:

checkForServerUpgrade()

An upgrade checker utility that enables you to verify whether MySQL server instances are ready for upgrade. SeeSection 12.1, “Upgrade Checker Utility”.

importJSON()

A JSON import utility that enables you to import JSON documents to a MySQL Server collection or table. SeeSection 12.2, “JSON Import Utility”.

exportTable()

A table export utility that exports a MySQL relational table into a data file, which can then be uploaded into a table on a target MySQL server using MySQL Shell's parallel table import utility, or to import data to a different application, or as a light-weight logical backup for a single data table. SeeSection 12.3, “Table Export Utility”.

importTable()

A parallel table import utility that splits up a single data file and uses multiple threads to load the chunks into a MySQL table. SeeSection 12.4, “Parallel Table Import Utility”.

dumpInstance(), dumpSchemas(), dumpTables(),

An instance dump utility, schema dump utility, table dump utility that can export all schemas, a selected schema, selected tables and views, from a MySQL instance to cloud storage or a set of local files. SeeSection 12.5, “Instance Dump Utility, Schema Dump Utility, and Table Dump Utility”.

dumpBinlogs()

A dump utility which can dump binary logs from a MySQL instance to cloud storage or a set of local files.

loadDump()

A dump loading utility that can import data dumped using MySQL Shell's Instance, Schema, and Table dump utilities into a MySQL instance. SeeSection 12.6, “Dump Loading Utility”.

loadBinlogs()

A dump loading utility that can import binary logs dumped using MySQL Shell's binlog dump utility into a MySQL instance. SeeSection 12.6, “Dump Loading Utility”.

collectDiagnostics()

A diagnostics generation utility that gathers information from the connected MySQL server, generates reports in TSV and YAML formats, and presents them in a zip archive in the location of your choice.

This utility enables you to retrieve diagnostic information from standalone servers, members of replication topologies, and MySQL HeatWave Service DB Systems.

SeeSection 12.9.1, “collectDiagnostics Utility”.

Important

MySQL Shell reads MySQL Server option files and login paths by default. As a result, if you connect to a MySQL Server which uses an option file, it will be used, by default, and attempt to create a global session using that configuration. If you do not want to use the options file, you must add--no-defaults to your command line.