3.1.3.2. Example Execution

shell> mysqldbcopy --source=root:root@localhost:3306 \
--destination=root:root@localhost:3307 --new-storage-engine=myisam \
world_innodb:world_myisam
# Source on localhost: ... connected.
# Destination on localhost: ... connected.
# Copying database world_innodb renamed as world_myisam
# Replacing ENGINE=InnoDB with ENGINE=myisam for table `world_myisam`.City.
# Copying TABLE world_innodb.City
# WARNING: FOREIGN KEY constraints for table world_myisam.City are missing because the new 
# storage engine for the table is not InnoDB
# Replacing ENGINE=InnoDB with ENGINE=myisam for table `world_myisam`.Country.
# Copying TABLE world_innodb.Country
# Replacing ENGINE=InnoDB with ENGINE=myisam for table `world_myisam`.CountryLanguage.
# Copying TABLE world_innodb.CountryLanguage
# WARNING: FOREIGN KEY constraints for table world_myisam.CountryLanguage are missing because 
# the new storage engine for the table is not InnoDB
# Copying data for TABLE world_innodb.City
# Copying data for TABLE world_innodb.Country
# Copying data for TABLE world_innodb.CountryLanguage
#...done.

shell> mysql -uroot -proot -h 127.0.0.1 --port=3307 -e "SHOW DATABASES"
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| sakila             |
| world              |
| world_myisam       |
+--------------------+

shell> mysql -uroot -proot -h 127.0.0.1 --port=3307 -e "SHOW CREATE TABLE world_myisam.countrylanguage\G"
*************************** 1. row ***************************
       Table: countrylanguage
Create Table: CREATE TABLE `countrylanguage` (
  `CountryCode` char(3) NOT NULL DEFAULT '',
  `Language` char(30) NOT NULL DEFAULT '',
  `IsOfficial` enum('T','F') NOT NULL DEFAULT 'F',
  `Percentage` float(4,1) NOT NULL DEFAULT '0.0',
  PRIMARY KEY (`CountryCode`,`Language`),
  KEY `CountryCode` (`CountryCode`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
        


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