mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-11-10 23:30:59 +00:00
docs: specify root username in mysql dump instructions
The default user in the mysql container is 'mysql', so the `mysql` command tries to use the 'mysql' MySQL user by default. But, in the MySQL dump instructions, we are providing the MySQL root user's password, so we need to specify `MYSQL_ROOT_USERNAME` as the MySQL user when invoking `mysql`.
This commit is contained in:
parent
78424776b6
commit
57108bdf76
@ -25,8 +25,10 @@ Making database dumps
|
||||
|
||||
To dump all data from the MySQL and Mongodb databases used on the platform, run the following commands::
|
||||
|
||||
tutor local exec -e MYSQL_ROOT_PASSWORD="$(tutor config printvalue MYSQL_ROOT_PASSWORD)" mysql \
|
||||
sh -c 'mysqldump --all-databases --password=$MYSQL_ROOT_PASSWORD > /var/lib/mysql/dump.sql'
|
||||
tutor local exec \
|
||||
-e USERNAME="$(tutor config printvalue MYSQL_ROOT_USERNAME)" \
|
||||
-e PASSWORD="$(tutor config printvalue MYSQL_ROOT_PASSWORD)" \
|
||||
mysql sh -c 'mysqldump --all-databases --user=$USERNAME --password=$PASSWORD > /var/lib/mysql/dump.sql'
|
||||
tutor local exec mongodb mongodump --out=/data/db/dump.mongodb
|
||||
|
||||
The ``dump.sql`` and ``dump.mongodb`` files will be located in ``$(tutor config printroot)/data/mysql`` and ``$(tutor config printroot)/data/mongodb``.
|
||||
|
Loading…
Reference in New Issue
Block a user