A Docker image for the community release of MySQL Shell.
- 8.4.x:
latest
,8
,8.4
,8.4-debian
,8.4-bookworm
- Tags also exist for the full version numbers (e.g.
8.4.4-debian
,8.4.4-bookworm
)
- Tags also exist for the full version numbers (e.g.
- 8.0.x:
8.0
,8.0-debian
,8.0-bookworm
- Tags also exist for the full version numbers (e.g.
8.0.41-debian
,8.0.41-bookworm
)
- Tags also exist for the full version numbers (e.g.
Because Oracle only provides an APT repository for x86_64 binaries, this image is only available on the linux/amd64
architecture.
# Run the interactive MySQL Shell prompt
docker run -it mindgrub/mysqlsh:8.4
We bundled a Python script to execute the Schema Dump utility and export to Amazon S3: /s3_dump_schema.py
docker run mindgrub/mysqlsh:8.4 mysqlsh --py -f s3_dump_schema.py
You can use this command along with certain environment variables.
SOURCE_HOST
: hostname of source database serverSOURCE_PORT
: TCP port for source database server (default: 3306)SOURCE_USER
: username for source databaseSOURCE_PASSWORD
: password for source databaseSOURCE_SCHEMA
– the name of the database to dumpBUCKET_NAME
: the name of the AWS S3 bucketBUCKET_PREFIX
: the directory prefix to use for the AWS S3 objects (default: snapshot-xxxxxxxxTxxxxxx using ISO date/time)MYSQLSH_THREADS
: number of threads to use for dumping (default: 4)MYSQLSH_SSL_MODE
: the MySQL SSL Mode (default: PREFERRED)SFN_TASK_TOKEN
– Optional. A Step Functions Task Token. If present, this token will be used to callSendTaskHeartbeat
andSendTaskSuccess
. The task output sent toSendTaskSuccess
will consist of a JSON object with two properties:bucket
andprefix
. Errors will be reported viaSendTaskFailure
.
If this Docker image is used within Amazon ECS, specify permissions to S3 (and optionally Step Functions) within your Task Definition role. Otherwise, you can provide AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
as environment variables.
We bundled a Python script to execute the Dump Load utility from an export stored in Amazon S3: /s3_load_schema.py
docker run mindgrub/mysqlsh:8.4 mysqlsh --py -f s3_load_schema.py
You can use this command along with certain environment variables.
DESTINATION_HOST
: hostname of destination database serverDESTINATION_PORT
: TCP port for destination database server (default: 3306)DESTINATION_USER
: username for destination databaseDESTINATION_PASSWORD
: password for destination databaseDESTINATION_SCHEMA
– the name of the database to restore intoBUCKET_NAME
: the name of the AWS S3 bucketBUCKET_PREFIX
: the S3 prefix of the dump directoryRECREATE_SCHEMA
: if specified, drop and re-create the existing schemaMYSQLSH_THREADS
: number of threads to use for loading (default: 4)MYSQLSH_SSL_MODE
: the MySQL SSL Mode (default: PREFERRED)SFN_TASK_TOKEN
– Optional. A Step Functions Task Token. If present, this token will be used to callSendTaskHeartbeat
andSendTaskSuccess
. The task output sent toSendTaskSuccess
will consist of a JSON object with two properties:host
andschema
. Errors will be reported viaSendTaskFailure
.
If this Docker image is used within Amazon ECS, specify permissions to S3 (and optionally Step Functions) within your Task Definition role. Otherwise, you can provide AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
as environment variables.
We bundled a script to execute the Copy Schema utility: /copy_schema.py
(this script is not available in the 8.0 image).
# New method
docker run -i mindgrub/mysqlsh:8.4 mysqlsh --py -f copy_schema.py
# Deprecated
docker run -i mindgrub/mysqlsh:8.4 /usr/bin/mysqlsh-copy-schema
You can use this command along with certain environment variables.
SOURCE_HOST
: hostname of source database serverSOURCE_PORT
: TCP port for source database server (default: 3306)SOURCE_USER
: username for source databaseSOURCE_PASSWORD
: password for source databaseSOURCE_SCHEMA
– the name of the database to dumpDESTINATION_HOST
: hostname of destination database serverDESTINATION_PORT
: TCP port for destination database server (default: 3306)DESTINATION_USER
: username for destination databaseDESTINATION_PASSWORD
: password for destination databaseDESTINATION_SCHEMA
– the name of the database to restore intoMYSQLSH_THREADS
: number of threads to use for copying (default: 4)MYSQLSH_SSL_MODE
: the MySQL SSL Mode (default: PREFERRED)RECREATE_SCHEMA
: if specified, drop and re-create the existing schema
When the command executes, the compatibility
argument of the copy schema utility is set to ["strip_definers"]
, and the consistency
argument is set to False
.