📢 Found an issue or want to request a new tool? Open an issue on GitHub
Command line client for MariaDB/MySQL.
# Interactive mode
docker run -it --rm \
ghcr.io/pabpereza/toolkitbox/mariadb:latest \
mariadb -h my-server.com -u root -p
# Run single query
docker run --rm \
ghcr.io/pabpereza/toolkitbox/mariadb:latest \
mariadb -h my-server.com -u root -pPASSWORD -e "SHOW DATABASES;"
apiVersion: v1
kind: Pod
metadata:
name: mariadb-client
spec:
containers:
- name: mariadb-client
image: ghcr.io/pabpereza/toolkitbox/mariadb:latest
command: ["sleep", "infinity"]
env:
- name: MYSQL_HOST
value: "mariadb-service"
- name: MYSQL_USER
value: "root"
- name: MYSQL_PWD
valueFrom:
secretKeyRef:
name: mariadb-credentials
key: password
MariaDB Client (mariadb / mysql) is the command line tool for connecting to MariaDB and MySQL servers. It allows you to execute SQL queries, manage databases, import/export data, and manage users.
This component installs mariadb-client from the Alpine Linux repositories.
mariadb -h hostname -u user -p
mariadb -h hostname -u user -p database_name
mariadb -h hostname -u user -p -e "SELECT * FROM table"
mariadb -h hostname -u user -p database < backup.sql
mariadb-dump -h hostname -u user -p database > backup.sql
mariadb-dump -h hostname -u user -p --no-data database > schema.sql
| Option | Description |
|---|---|
-h, --host | Server to connect to |
-P, --port | Port (default: 3306) |
-u, --user | Connection user |
-p, --password | Prompt for password |
-D, --database | Database to select |
-e, --execute | Execute command and exit |
v10.3 - MariaDB 10.3v10.4 - MariaDB 10.4Content type
Image
Digest
sha256:174d478bd…
Size
17.7 MB
Last updated
18 days ago
docker pull toolkitbox/mariadb