Sign inSign up

andreswebs/mysql-client

By andreswebs

Updated almost 3 years ago

Image
0

2.4K

andreswebs/mysql-client repository overview

mysql-client-docker

A mysql-client docker image for k8s deployment.

Running locally

Connect to a MySQL database
docker run --rm -it --name mysql-client andreswebs/mysql-client -u <user> -p<password> -h <host_ip_address> -P <port> -D <database>

(Notice that there is no space between -p and the password string.)

To get a shell inside the running container:

docker exec -it mysql-client /bin/sh

Running on kubernetes

Prerequisites

You need a working k8s cluster and kubectl configured.

Deploy the objects:
kubectl apply -f mysql-client.yml
Attach to the pod:
kubectl attach --namespace=mysql-client -ti mysql-client
Connect to a MySQL database:
mysql -u <user> -p<password> -h <host_ip_address> -P <port> -D <database>

(Notice that there is no space between -p and the password string.)

Authors

Andre Silva

License

This project is licensed under the Unlicense.

Tag summary

Content type

Image

Digest

sha256:d2efa9d12

Size

22.5 MB

Last updated

almost 3 years ago

docker pull andreswebs/mysql-client