Skip to content
This repository was archived by the owner on Jul 5, 2023. It is now read-only.

cloud-ready/docker-mysql

Repository files navigation

docker-mysql

mysql using uid 1000

Dockerfile cloud-ready/docker-mysql on Github

cloudready/mysql on Docker Hub

Connect to mysql on Mac OSX

Find out if there is a mysql client on your Mac, run brew list | grep mysql-client in terminal.

If no mysql installed run

brew install mysql-client

# The following command should not be executed repeatedly.
echo 'export PATH="/usr/local/opt/mysql-client/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

in terminal.

Connect to mysql by mysql-client

mysql -h 127.0.0.1 -P 3306 -u root -proot_pass

Run SQL script file by mysql-client

mysql -h 127.0.0.1 -P 3306 -u root -proot_pass < path/to/your.sql

Send multi-line queries by mysql-client

mysql -h 127.0.0.1 -P 3306 -u root -proot_pass << "EOF"

SHOW DATABASES;
EOF

About

mysql using uid 1000

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published