#!/bin/bash #empty db printf "DROP database test_db;" | docker exec -i bayadicbot_db_1 /usr/bin/mysql -u root --password=my_secret_pw_shh printf "DROP database test_swedish_db;" | docker exec -i bayadicbot_db_1 /usr/bin/mysql -u root --password=my_secret_pw_shh printf "CREATE database test_db;" | docker exec -i bayadicbot_db_1 /usr/bin/mysql -u root --password=my_secret_pw_shh; printf "CREATE database test_swedish_db;" | docker exec -i bayadicbot_db_1 /usr/bin/mysql -u root --password=my_secret_pw_shh; # Restore cat telegram_german_bot.sql | docker exec -i bayadicbot_db_1 /usr/bin/mysql -u root --password=my_secret_pw_shh test_db # cat init.sql | docker exec -i bayadicbot_db_1 /usr/bin/mysql -u root --password=my_secret_pw_shh echo "IMPORTANT ---- THE IMPORT PROCESS MUST BE FINISHED WITHOUT ERROR -----" cat telegram_swedish_bot.sql | docker exec -i bayadicbot_db_1 /usr/bin/mysql -u root --password=my_secret_pw_shh test_swedish_db printf "use mysql; GRANT ALL ON test_swedish_db.* TO 'devuser'; FLUSH PRIVILEGES;" | docker exec -i bayadicbot_db_1 /usr/bin/mysql -u root --password=my_secret_pw_shh; # Backup docker exec bayadicbot_db_1 /usr/bin/mysqldump -u root --password=my_secret_pw_shh test_db > telegram_german_bot_bak.sql docker exec bayadicbot_db_1 /usr/bin/mysqldump -u root --password=my_secret_pw_shh test_swedish_db > telegram_swedish_bot_bak.sql
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
.settings | Folder | 0755 |
|
|
.vscode | Folder | 0755 |
|
|
config | Folder | 0755 |
|
|
docs | Folder | 0755 |
|
|
redirectbotpage | Folder | 0755 |
|
|
src | Folder | 0755 |
|
|
tests | Folder | 0755 |
|
|
translatorApi | Folder | 0755 |
|
|
vendor | Folder | 0755 |
|
|
.git | File | 35 B | 0644 |
|
.gitignore | File | 86 B | 0644 |
|
.gitlab-ci.yml | File | 1.37 KB | 0644 |
|
.gitmodules | File | 200 B | 0644 |
|
composer.json | File | 260 B | 0644 |
|
composer.lock | File | 153.66 KB | 0644 |
|
docker-compose.yml | File | 457 B | 0644 |
|
my.cnf | File | 100 B | 0644 |
|
mysql-docker.sh | File | 1.35 KB | 0755 |
|
phpunit.xml | File | 534 B | 0644 |
|
telegram_german_bot.sql | File | 30.04 KB | 0644 |
|
telegram_german_bot_bak.sql | File | 36.57 KB | 0644 |
|
telegram_swedish_bot.sql | File | 13.05 KB | 0644 |
|
telegram_swedish_bot_bak.sql | File | 16.68 KB | 0644 |
|