Skip to content
This repository has been archived by the owner on Nov 16, 2021. It is now read-only.

Commit

Permalink
Remove MySQL database dump after setup
Browse files Browse the repository at this point in the history
Otherwise it would just hang about on the slave machine.
  • Loading branch information
alexmuller committed Nov 6, 2015
1 parent f85ccc3 commit be3e939
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mysql.py
Expand Up @@ -92,6 +92,8 @@ def replicate_slave_from_master(master):
print('Importing MySQL database which is {0}GB, this might take a while...'.format(round(int(database_file_size) / (1024*1024*1024*1.0), 1)))
run('sudo -i mysql -uroot < dump.sql')

run('rm dump.sql')

run_mysql_command("START SLAVE")
run_mysql_command("SET GLOBAL slow_query_log=ON")

Expand Down

0 comments on commit be3e939

Please sign in to comment.