Created
November 10, 2020 14:46
-
-
Save a4amaan/d551e1dfd442287972edd334690e9dd1 to your computer and use it in GitHub Desktop.
Dockerized Mysql Setup
This file contains 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
https://towardsdatascience.com/connect-to-mysql-running-in-docker-container-from-a-local-machine-6d996c574e55 | |
docker volume create mysql-volume | |
docker run --name=mysql -p 3306:3306 -v mysql-volume:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=password -d mysql/mysql-server:8.0.20 | |
docker exec -it mysql mysql -u root -p | |
password | |
update mysql.user set host = '%' where user='root'; | |
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'password'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment