DROP DATABASE IF EXISTS empty_db;
DROP DATABASE IF EXISTS other_db;
CREATE DATABASE empty_db;
CREATE DATABASE other_db;
BACKUP DATABASE empty_db TO 'empty_db.bak';
backup_id
#
BACKUP DATABASE * TO 'all.bak';
backup_id
#
DROP DATABASE empty_db;
DROP DATABASE other_db;
SHOW DATABASES;
Database
information_schema
mtr
mysql
test
RESTORE FROM 'all.bak' OVERWRITE;
backup_id
#
SHOW DATABASES;
Database
information_schema
empty_db
mtr
mysql
other_db
test
DROP DATABASE empty_db;
DROP DATABASE other_db;
RESTORE FROM 'empty_db.bak';
backup_id
#
SHOW DATABASES;
Database
information_schema
empty_db
mtr
mysql
test
SHOW TABLES IN empty_db;
Tables_in_empty_db
RESTORE FROM 'all.bak' OVERWRITE;
backup_id
#
SHOW DATABASES;
Database
information_schema
empty_db
mtr
mysql
other_db
test
SHOW TABLES IN empty_db;
Tables_in_empty_db
USE empty_db;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
`dir_code` char(4),
`building` char(6)
) ENGINE=MYISAM DEFAULT CHARSET=latin1;
BACKUP DATABASE empty_db TO 'empty_db.bak';
backup_id
#
SHOW DATABASES;
Database
information_schema
empty_db
mtr
mysql
other_db
test
RESTORE FROM 'empty_db.bak' OVERWRITE;
backup_id
#
USE empty_db;
SHOW TABLES;
Tables_in_empty_db
t1
DROP DATABASE IF EXISTS empty_db;
DROP DATABASE IF EXISTS other_db;
