1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-05 09:15:25 +02:00
tldr/pages/common/mysqlsh.md
Managor 23340cc6e0
common/*: reduce usage of "command-line" (part 1) (#16949)
Co-authored-by: Dylan <145150333+dmmqz@users.noreply.github.com>
Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
2025-06-29 11:48:18 +03:00

822 B

mysqlsh

Advanced client for MySQL, supporting SQL, JavaScript, and Python. It offers features for managing InnoDB clusters and document store collections. More information: https://dev.mysql.com/doc/mysql-shell/en/mysql-shell-commands.html.

  • Start MySQL Shell in interactive mode:

mysqlsh

  • Connect to a MySQL server:

mysqlsh --user {{username}} --host {{hostname}} --port {{port}}

  • Execute an SQL statement on the server and exit:

mysqlsh --user {{username}} --execute '{{sql_statement}}'

  • Start MySQL Shell in JavaScript mode:

mysqlsh --js

  • Start MySQL Shell in Python mode:

mysqlsh --py

  • Import JSON documents into a MySQL collection:

mysqlsh --import {{path/to/file.json}} --schema {{schema_name}} --collection {{collection_name}}

  • Enable verbose output:

mysqlsh --verbose