mysqlsh
mySQL Shell client
TLDR
Start MySQL Shell
$ mysqlsh
Connect to server$ mysqlsh -u [username] -h [hostname]
Connect with URI$ mysqlsh [mysql://user@host:3306/database]
Execute SQL mode$ mysqlsh --sql -u [user] -e "[SELECT 1]"
JavaScript mode$ mysqlsh --js
Python mode$ mysqlsh --py
Run script$ mysqlsh -f [script.js]
SYNOPSIS
mysqlsh [options] [uri]
DESCRIPTION
mysqlsh is the MySQL Shell client. It provides SQL, JavaScript, and Python interfaces.
The tool supports MySQL 8.0 features. Includes AdminAPI for cluster management.
PARAMETERS
URI
Connection URI.-u USER
Username.-h HOST
Hostname.--sql
SQL mode.--js
JavaScript mode.--py
Python mode.-f FILE
Execute script file.--help
Display help information.
CAVEATS
Requires MySQL 8.0+. Three language modes. Replaces legacy mysql for new features.
HISTORY
MySQL Shell was introduced with MySQL 8.0 as a modern client supporting multiple scripting languages.
SEE ALSO
mysql(1), mysqladmin(1), mycli(1)
