From 51b9299748785fc424c7dd95ea0905c249bf9aac Mon Sep 17 00:00:00 2001 From: Weihang Zheng <54783950+weihangzheng@users.noreply.github.com> Date: Wed, 6 Dec 2023 11:59:56 -0500 Subject: [PATCH] mysqlsh: add page (#11672) * mysqlsh: add page --------- Co-authored-by: K.B.Dharun Krishna --- pages/common/mysqlsh.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 pages/common/mysqlsh.md diff --git a/pages/common/mysqlsh.md b/pages/common/mysqlsh.md new file mode 100644 index 000000000..cc8787b92 --- /dev/null +++ b/pages/common/mysqlsh.md @@ -0,0 +1,33 @@ +# mysqlsh + +> Advanced command-line client for MySQL, supporting SQL, JavaScript, and Python. +> It offers features for managing InnoDB clusters and document store collections. +> More information: . + +- Start MySQL Shell in interactive mode: + +`mysqlsh` + +- Connect to a MySQL server: + +`mysqlsh --user {{username}} --host {{hostname}} --port {{port}}` + +- Execute a 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`