Sign inSign up

codeclou/docker-mysqldb

By codeclou

•Updated over 9 years ago

Dockerized MariaDB for testing.

Image
0

317

codeclou/docker-mysqldb repository overview

⁠docker-mysqldb

MariaDB⁠ Docker-Image for local testing and development.


 

⁠Prerequisites

 

⁠Usage

Start on Port 3366 with user dbadmin and password dbadmin and mysql-data dir in ./mysql-data/.

docker run \
     -i -t \
     -p 3366:3306 \
     -v $(pwd)/mysql-data:/var/lib/mysql \
     codeclou/docker-mysqldb:latest

Start with custom mysql username and password

docker run \
     -i -t \
     -p 3366:3306 \
     -e MYSQL_USER='steve' \
     -e MYSQL_PASS='foo' \
     -v $(pwd)/mysql-data:/var/lib/mysql \
     codeclou/docker-mysqldb:latest

Note:

  • The mysql-Database containing Users is only copied into mysql-data dir on each start if it does not exist.
  • That means you need to delete it if you want to start the server with a different MYSQL_USER and MYSQL_PASSWORD.

 

If you need to access the error.log use this command and replace ID with your containers ID.

docker exec -i -t 6f7c0c747260 cat /var/log/mysql/error.log

 

⁠License, Liability & Support

Tag summary

Content type

Image

Digest

Size

49.8 MB

Last updated

over 9 years ago

docker pull codeclou/docker-mysqldb