You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
> [MySQL 8 client](https://dev.mysql.com/doc/refman/8.0/en/programs-client.html) for export and import databases easily using Docker.
6
6
7
-
This is a __Linux Docker image__ using latest __Debian [11-slim](https://hub.docker.com/_/debian?tab=tags&page=1&name=11-slim)__ ([Bullseye](https://www.debian.org/News/2021/20210814)).
7
+
This is a __Linux Docker image__ using the latest __Debian [11-slim](https://hub.docker.com/_/debian?tab=tags&page=1&name=11-slim)__ ([Bullseye](https://www.debian.org/News/2021/20210814)).
8
8
9
9
_**Note:** If you are looking for a **MariaDB Client** then go to [Alpine MySQL Client](https://github.com/joseluisq/alpine-mysql-client) project._
10
10
@@ -27,7 +27,7 @@ mysqldumpslow
27
27
mysqlshow
28
28
```
29
29
30
-
For more details see official [MySQL 8 Client Programs](https://dev.mysql.com/doc/refman/8.0/en/programs-client.html) documentation.
30
+
For more details see the official [MySQL 8 Client Programs](https://dev.mysql.com/doc/refman/8.0/en/programs-client.html) documentation.
31
31
32
32
## Usage
33
33
@@ -38,13 +38,13 @@ docker run -it --rm joseluisq/mysql-client mysql --version
38
38
39
39
## User privileges
40
40
41
-
-Default user (unprivileged) is `mysql`.
41
+
-The default user (unprivileged) is `mysql`.
42
42
-`mysql` home directory is located at `/home/mysql`.
43
43
- If you want a full privileged user try `root`. E.g append a `--user root` argument to `docker run`.
44
44
45
45
## Exporter
46
46
47
-
`mysql_exporter` is a custom tool which exports a database script using `mysqldump`. Additionally it support gzip compression.
47
+
`mysql_exporter` is a custom tool that exports a database script using `mysqldump`. Additionally, it support gzip compression.
48
48
It can be configured via environment variables or using `.env` file.
49
49
50
50
### Setup via environment variables
@@ -74,13 +74,13 @@ DB_ARGS=
74
74
75
75
**Notes:**
76
76
77
-
-`DB_EXPORT_GZIP=true`: Compress the sql file using Gzip (optional). If `false` or not defined then the exported file will be a `.sql` file.
78
-
-`DB_ARGS`: can be used in order to pass more `mysqldump` arguments (optional).
79
-
-An`.env` example file can be found at [./8.0/env/mysql_exporter.env](./8.0/env/mysql_exporter.env)
77
+
-`DB_EXPORT_GZIP=true`: Compress the SQL file using Gzip (optional). If `false` or not defined then the exported file will be a `.sql` file.
78
+
-`DB_ARGS`: can be used to pass more `mysqldump` arguments (optional).
79
+
-A`.env` example file can be found at [./8.0/env/mysql_exporter.env](./8.0/env/mysql_exporter.env)
80
80
81
81
### Export a database using a Docker container
82
82
83
-
The following Docker commands create a container in order to export a database and then remove such container automatically.
83
+
The following Docker commands create a container to export a database and then remove the container automatically.
84
84
85
85
Note that `mysql_exporter` supports environment variables or a `.env` file can be passed as an argument.
86
86
@@ -105,12 +105,12 @@ docker run --rm -it \
105
105
106
106
__Notes:__
107
107
108
-
-`--volume $PWD:/home/mysql/sample`specificy a [bind mount directory](https://docs.docker.com/storage/bind-mounts/) from host to container.
109
-
-`$PWD` is just a example host working directory. Use your own path.
108
+
-`--volume $PWD:/home/mysql/sample`specifies a [bind mount [directory](https://docs.docker.com/storage/bind-mounts/) from the host to the container.
109
+
-`$PWD` is just an example host working directory. Use your path.
110
110
-`/home/mysql/` is default home directory user (optional). View [User privileges](#user-privileges) section above.
111
111
-`/home/mysql/sample` is a container directory that Docker will create for us.
112
-
-`--workdir /home/mysql/sample`specificy the working directory used by default inside the container.
113
-
-`production.env` is a custom env file path with the corresponding environment variables passed as argument. That file shoud available in your host working directory. E.g `$PWD` in my case.
112
+
-`--workdir /home/mysql/sample`specifies the working directory used by default inside the container.
113
+
-`production.env` is a custom env file path with the corresponding environment variables passed as arguments. That file should be available in your host working directory. E.g `$PWD` in this case.
114
114
115
115
### Export a database using a Docker Compose file
116
116
@@ -131,7 +131,7 @@ services:
131
131
132
132
## Importer
133
133
134
-
`mysql_importer` is a custom tool which imports a SQL script file (text or Gzip) using `mysql` command.
134
+
`mysql_importer` is a custom tool that imports a SQL script file (text or Gzip) using `mysql` command.
135
135
It can be configured via environment variables or using `.env` file.
136
136
137
137
### Setup via environment variables
@@ -161,7 +161,7 @@ DB_ARGS=
161
161
162
162
### Import a SQL script via a Docker container
163
163
164
-
The following Docker commands create a container in order to import a SQL script file to an specific database and removing the container afterwards.
164
+
The following Docker commands create a container to import a SQL script file to a specific database and remove the container afterward.
165
165
166
166
Note that `mysql_importer` supports environment variables or a `.env` file can be passed as an argument.
167
167
@@ -186,8 +186,8 @@ docker run --rm -it \
186
186
**Notes:**
187
187
188
188
-`DB_IMPORT_GZIP=true`: Decompress a dump file using Gzip (optional). If `false` or not defined then the import file will be treated as plain `.sql` file.
189
-
-`DB_ARGS`: can be used in order to pass more `mysql` arguments (optional).
190
-
-An`.env` example file can be found at [./8.0/env/mysql_importer.env](./8.0/env/mysql_importer.env)
189
+
-`DB_ARGS`: can be used to pass more `mysql` arguments (optional).
190
+
-A`.env` example file can be found at [./8.0/env/mysql_importer.env](./8.0/env/mysql_importer.env)
0 commit comments