Export:
1. export from GCP mysql
mysqldump -u user -p database [tables] > ddd.sql
2. export entire database
mysqldump -u user -p database --column-statistics=0 --triggers --routines > data.sql
Import:
1. edit export file and remove following lines
SET @@SESSION.SQL_LOG_BIN= 0;
SET @@GLOBAL.GTID_PURGED=/*!80000 '+'*/ '';
SET @@SESSION.SQL_LOG_BIN = @MYSQLDUMP_TEMP_LOG_BIN;
2. mysql -u user -p database < data.sql
沒有留言:
張貼留言