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
> [MySQL client](https://dev.mysql.com/doc/refman/8.0/en/programs-client.html) (MariaDB Client) for easy **export** and **import** databases using Docker.
5
+
> [MySQL client](https://dev.mysql.com/doc/refman/8.0/en/programs-client.html) ([MariaDB Client](https://mariadb.com/kb/en/clients-utilities/)) for easy **export** and **import** databases using Docker.
6
6
7
7
_**Note:** If you are looking for a **MySQL 8 Client** then go to [Docker MySQL 8 Client](https://github.com/joseluisq/docker-mysql-client) project._
8
8
9
9
🐳 View on [Docker Hub](https://hub.docker.com/r/joseluisq/alpine-mysql-client/)
10
10
11
11
## MySQL Client programs
12
12
13
-
**Note:**[MySQL client (mariadb-client)](https://pkgs.alpinelinux.org/package/v3.11/main/x86_64/mysql-client) is an alias package for [mysql-client](https://dev.mysql.com/doc/refman/8.0/en/programs-client.html) migration tools.
13
+
**Note:**[MySQL client (mariadb-client)](https://pkgs.alpinelinux.org/package/v3.21/main/x86_64/mysql-client) is an alias package for [mysql-client](https://dev.mysql.com/doc/refman/8.0/en/programs-client.html) migration tools.
14
14
15
15
```sh
16
-
mysql
17
-
mysql_find_rows
18
-
mysql_waitpid
19
-
mysqladmin
20
-
mysqldump
21
-
mysqlimport
22
-
mysql-export
16
+
# Equivalent MySQL client tools
17
+
mariadb
18
+
mariadb-access
19
+
mariadb-admin
20
+
mariadb-check
21
+
mariadb-dump
22
+
mariadb-dumpslow
23
+
mariadb-find-rows
24
+
mariadb-import
25
+
mariadb-secure-installation
26
+
mariadb-show
27
+
mariadb-waitpid
23
28
mysql_fix_extensions
24
-
mysqlaccess
25
-
mysqlcheck
26
-
mysqldumpslow
27
-
mysqlshow
29
+
30
+
# Tools provided by this image
31
+
mysql_exporter
32
+
mysql_importer
28
33
```
29
34
30
35
For more details check it out:
31
36
32
-
-[MariaDB 10 - Clients and Utilities](https://mariadb.com/kb/en/clients-utilities/)
37
+
-[MariaDB 11 - Clients and Utilities](https://mariadb.com/kb/en/clients-utilities/)
docker run -it --rm joseluisq/alpine-mysql-client mysql --version
39
-
#mysql Ver 15.1 Distrib 10.11.8-MariaDB, for Linux (x86_64) using readline 5.1
43
+
docker run -it --rm joseluisq/alpine-mysql-client mariadb --version
44
+
#mariadb from 11.4.4-MariaDB, client 15.2 for Linux (x86_64) using readline 5.1
40
45
```
41
46
42
47
## User privileges
@@ -51,7 +56,7 @@ This image comes with some additional tools.
51
56
52
57
### Exporter
53
58
54
-
`mysql_exporter` is a custom tool that exports a database script using `mysqldump`. Additionally, it supports gzip compression.
59
+
`mysql_exporter` is a custom tool that exports a database script using `mariadb-dump` (a.k.a. `mysqldump`). Additionally, it supports gzip compression.
55
60
It can be configured via environment variables or using `.env` file.
56
61
57
62
#### Setup via environment variables
@@ -82,7 +87,7 @@ DB_ARGS=
82
87
**Notes:**
83
88
84
89
-`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.
85
-
-`DB_ARGS`: can be used to pass more `mysqldump` arguments (optional).
90
+
-`DB_ARGS`: can be used to pass more `mariadb-dump` (a.k.a. `mysqldump`) arguments (optional).
86
91
- A `.env` example file can be found at [./mysql_exporter.env](./mysql_exporter.env)
87
92
88
93
#### Export a database using a Docker container
@@ -101,7 +106,7 @@ docker run --rm -it \
101
106
102
107
# Alpine / MySQL Client - Exporter
103
108
# ================================
104
-
#mysqldump Ver 10.17 Distrib 10.4.12-MariaDB, for Linux (x86_64)
109
+
#mariadb-dump from 11.4.4-MariaDB, client 10.19 for Linux (x86_64)
105
110
# Exporting database `mydb` into a SQL script file...
106
111
# Output file: mydb.sql.gz (SQL GZipped)
107
112
# Database `mydb` was exported on 0s successfully!
@@ -136,7 +141,7 @@ services:
136
141
137
142
### Importer
138
143
139
-
`mysql_importer` is a custom tool that imports a SQL script file (text or Gzip) using `mysql` command.
144
+
`mysql_importer` is a custom tool that imports a SQL script file (text or Gzip) using `mariadb` (a.k.a. `mysql`) command.
140
145
It can be configured via environment variables or using `.env` file.
141
146
142
147
#### Setup via environment variables
@@ -180,7 +185,7 @@ docker run --rm -it \
180
185
181
186
# Alpine / MySQL Client - Importer
182
187
# ================================
183
-
#mysql Ver 15.1 Distrib 10.4.12-MariaDB, for Linux (x86_64) using readline 5.1
188
+
#mariadb from 11.4.4-MariaDB, client 15.2 for Linux (x86_64) using readline 5.1
184
189
# Importing a SQL script file into database `dbtesting`...
185
190
# Input file: mydb.sql.gz (10M / SQL GZipped)
186
191
# Database `dbtesting` was imported on 1s successfully!
0 commit comments