Server/ETC
Run MySQL in Docker (MacOS M1)!
Agrafenaaa
2022. 8. 9. 09:38
1. Pre-install rosetta.
## 1.
softwareupdate --install-rosetta
2. Download the install package (dmg) in the official site - https://docs.docker.com/desktop/mac/apple-silicon/
3. Run the installed application and enter the command in Terminal.
docker run -d -p 80:80 docker/getting-started
4. Pull and set up MySql in docker
docker images
docker run --name mysql-container -e MYSQL_ROOT_PASSWORD=xxxx -d -p 3306:3306 mysql:latest
docker ps -a
💁🏻♀️ default commands -> docker stop(start/restart) CONTAINER_NAME
5. Connect to the root account of MySQL
docker exec -i -t mysql-container bash
mysql -u root -p
6. Connect localhost in DBeaver.
6-1. If you got the error "public key retrieval is not allowed" which is caused in the version higher than 8, set 'TRUE' in allowPublicKeyRetrieval in its Driver properties. (It is recommended just for testing purpose only)