3.1.1.2. Example Execution

shell> mysqldbexport --server=root:root@localhost:13001 --all --export=both --rpl=master --rpl-user=rpl:rpl > data.sql
shell> mysqldbimport --server=root:root@localhost:13002 data.sql

# Source on localhost: ... connected.
# Importing definitions from data.sql.
ERROR: The import operation contains GTID statements that require the global gtid_executed 
system variable on the target to be empty (no value). The gtid_executed value must be reset 
by issuing a RESET MASTER command on the target prior to attempting the import operation. 
Once the global gtid_executed value is cleared, you may retry the import.

shell> mysql -uroot -proot -h 127.0.0.1 --port=13002 -e "RESET MASTER"
shell> mysqldbimport --server=root:root@localhost:13002 data.sql

# Source on localhost: ... connected.
# Importing definitions from data.sql.
CAUTION: The following 1 warning messages were included in the import file:
# WARNING: A partial export from a server that has GTIDs enabled will by default include 
the GTIDs of all transactions, even those that changed suppressed parts of the database. 
If you don't want to generate the GTID statement, use the --skip-gtid option. To export all 
databases, use the --all and --export=both options.
#...done.
        


User Comments
Sign Up Login You must be logged in to post a comment.