- Our workshop slack channel is
pt-conf-2023-workshop-db-index
.
Feel free ask any questions there in case you are remote during workshop or you have any issues with setting up the work envoironment.
Using mysql-base docker container and dummy test database:
- On your local machine, inside home directory, create working directory for example:
mkdir workshop-indexing
cd workshop-indexing
- Git clone this repo (docker-compose.yml and some initial sql script for DB):
git clone git@github.com:lemon57/boozt-workshop-2023.git
cd boozt-workshop-2023
- Download dump of the test database from
goodle drive
Download only this sql filebackup_index0522.sql
Move it inside~/workshop-indexing/boozt-workshop-2023
on your local machine - Start docker container:
Go to
~/workshop-indexing/boozt-workshop-2023
Rundocker compose up -d
Your docker container based on mysql-base image should be up now.
To check that, run:
docker ps
You should see the docker container with the nameboozt-workshop-2023-mysql-1
. - Check connection to your test DB inside the container:
Inside this directory
~/workshop-indexing/boozt-workshop-2023
rundocker compose exec -it mysql mysql -u root --password=index
You should get mysql prompt:
mysql>
Inside this mysql prompt runshow databases;
, you should seeindex_test
DB.
Typeexit;
. You should be now inside~/workshop-indexing/boozt-workshop-2023
directory again. - Get the name of your container:
Rundocker ps
, the name should beboozt-workshop-2023-mysql-1
. - Your docker container is up and
index_test
DB exist,
then import prepared DB dump data (downloaded sql file) inside this DB.
Inside~/workshop-indexing/boozt-workshop-2023
Run:
cat backup_index0522.sql | docker exec -i boozt-workshop-2023-mysql-1 /usr/bin/mysql -u root --password=index index_test
Now your test DB inside the docker container is ready.
index_test
DB should have two tables: customers
and orders
with some dummy data.
- You should also have one of the DB management tool to connect to the DB and run queries.
- Sequel ACE,
- DBeaver,
- or any other
- Using your DB management tool connect to your test DB.
Connection specs:
- host: 127.0.0.1
- username: root
- password: index
- database: index_test
Selectindex_test
DB and check that you have two tablesorders
andcustomers
with data.
Now your work envoironment for the workshop is ready. 🍾
If you have any questions just ask in the channel pt-conf-2023-workshop-db-index
.