1. Dump the table MyTable1 in database MyDatabase1 into a file:
$ mysqldump -u mydbusername -p MyDatabase1 MyTable1 > MyTable1.dump
Enter the DB password. The data of the table is saved into MyTable1.dump.
2. Run the mysql client:
$ mysql -u mydbusername -p
3. Create a new database:
MYSQL> create database MyDatabase2
4. Clone the table:
MYSQL> source /path/to/MyTable1.dump
Thursday, April 11, 2019
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment