Task Detail
-
Starting a MySQL instance Activity on Thu Apr 12 2018 17:49:58 GMT+0000 (UTC) following https://hub.docker.com/_/mysql/ 1. docker run --name gphan-mysql -e MYSQL_ROOT_PASSWORD=o1 -d mysql:8 2. The container will automatically run (use "docker ps" to check) 3. Testing the MySQL: first need to get into the container bash shell by "docker exec -it gphan-mysql bash" 4. Second, from inside of the container bash shell run "mysql -u root -p" and fill out password.
10/31/2024 13:58:30 -
Imported SAM database Activity on Thu Apr 12 2018 18:14:56 GMT+0000 (UTC) 1. From inside of the container, I can "uname -a" to check on what linux this MySQL instance is running on. 2. Copied sam.sql to the docker container: 2.1 First opened a new terminal and ran "docker cp Desktop/sam/sam.sql gphan-mysql:/sam.sql" 2.2 Second, used the terminal with the container bash shell is running and run "mysql -u root -p" to get into mysql first, then "create database sam". 2.3 Third, exit to the bash shell again, and ran "mysql -u root -p sam < sam.sql" to import sam.sql to sam database.
10/31/2024 13:57:57