Skip to content

Commit be3e939

Browse files
committed
Remove MySQL database dump after setup
Otherwise it would just hang about on the slave machine.
1 parent f85ccc3 commit be3e939

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mysql.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ def replicate_slave_from_master(master):
9292
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)))
9393
run('sudo -i mysql -uroot < dump.sql')
9494

95+
run('rm dump.sql')
96+
9597
run_mysql_command("START SLAVE")
9698
run_mysql_command("SET GLOBAL slow_query_log=ON")
9799

0 commit comments

Comments
 (0)