Last active
May 20, 2020 15:26
-
-
Save corlaez/715cec79f610353d79d97f84a398c58d to your computer and use it in GitHub Desktop.
Docker mysql socket connection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.1' | |
services: | |
# phpmyadmin: | |
# image: phpmyadmin/phpmyadmin | |
# ports: | |
# - 8080:80 | |
# environment: | |
# - "PMA_HOST=mysql" | |
mysql: | |
image: mysql:5.6 | |
environment: | |
MYSQL_USER: username | |
MYSQL_PASSWORD: password | |
MYSQL_ROOT_PASSWORD: rootpasword | |
volumes: | |
- dbdata:/var/lib/mysql | |
- /var/run/mysqld/:/var/run/mysqld/ | |
ports: | |
- 3306:3306 | |
elasticsearch: | |
image: elasticsearch | |
environment: | |
discovery.type: single-node | |
ports: | |
- 9200:9200 | |
- 9300:9300 | |
volumes: | |
dbdata: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p /var/run/mysqld | |
sudo chmod 0777 /var/run/mysqld -R |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment