Skip to content

raymond-liao/mysql-docker-compose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mysql-docker-compose

A docker-compose sample to start MySQL database.

How to use?

  1. Clone the project:
  $ git clone https://github.com/gaoshanyu/mysql-docker-compose.git
  1. Start MySQL via docker-compose in terminal:
  $ cd ./mysql-docker-compose
  // Please add path "/usr/local/var/mysql" as the sharing folder for your Docker before
  $ docker-compose up -d
  1. Connect to the MySQL server:
  # Enter in the docker container
  $ docker exec -it mysql bash
  # Connect to mysql service, and enter in password 12345678
  $ mysql -h 127.0.0.1 -u root -P 3306 -p
  1. Other commands maybe needed:
  # you can stop service by the command
  $ docker stop mysql
  # you can start service by the command
  $ docker start mysql
  # you can restart service by the command
  $ docker restart mysql

About

A [docker-compose](https://docs.docker.com/compose/) sample to start `MySQL` database.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published