Browse Source

fix restore database config file in d-mysql

master
Charles Reid 5 years ago
parent
commit
249293dbcf
  1. 2
      d-mysql
  2. 4
      utils-mysql/restore_database.sh

2
d-mysql

@ -1 +1 @@ @@ -1 +1 @@
Subproject commit c34607d03d3dd342b7f10416645eb52a8697ba3c
Subproject commit 20e811f8ded89fc5beca2c1452e4705a94b170fb

4
utils-mysql/restore_database.sh

@ -66,7 +66,7 @@ then @@ -66,7 +66,7 @@ then
# Step 2: Run sqldump inside the container
set -x
docker exec -i ${CONTAINER_NAME} "/usr/bin/mysql -uroot < /tmp/${TARGET}"
docker exec -i ${CONTAINER_NAME} '/usr/bin/mysql --default-file /root/.mysql.rootpw.cnf < /tmp/*.sql'
set +x
#'/usr/bin/mysql -uroot -p`echo $MYSQL_ROOT_PASSWORD` < ' $1
#/usr/bin/mysql --user=root --password='ABCDEFG' < /backups/wikidb_2019-07-24/wikidb_2019-07-24.sql
@ -75,7 +75,7 @@ then @@ -75,7 +75,7 @@ then
# Step 3: Clean up sql dump from inside container
set -x
docker exec -i ${CONTAINER_NAME} "/bin/rm -fr /tmp/${TARGET}"
docker exec -i ${CONTAINER_NAME} "/bin/rm -fr /tmp/*.sql"
set +x

Loading…
Cancel
Save