From b2d918ca3d7003320e432aca41725a2d0a24c1f4 Mon Sep 17 00:00:00 2001 From: pdiogoantunes Date: Thu, 22 Jun 2017 14:00:41 +0200 Subject: [PATCH] typo --- HowtoMySQL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HowtoMySQL.md b/HowtoMySQL.md index d2ad7420..41ccef2a 100644 --- a/HowtoMySQL.md +++ b/HowtoMySQL.md @@ -339,8 +339,8 @@ mysql> DROP USER 'user'@'localhost'; - Créer une base vide - Renommer toutes les tables vers cette dernière (utilisation script ci-dessous) -~~~ -BASE_FROM=bf_griffe16; BASE_TO=bf_griffe16_old +~~~{.bash} +BASE_FROM=db1; BASE_TO=db2 for table in $(mysql -e "use $BASE_FROM; show tables\G;" | grep -v '^\*\*\*' | cut -d':' -f2 | sed 's/^ //'); do echo $table; mysql -e "RENAME TABLE ${BASE_FROM}.${table} TO ${BASE_TO}.${table};"; done ~~~