In MySQL I want to clone certain databases. Is there such a thing as a
CREATE DATABASE LIKE
command?
I know
MySQLDump
This is just one another way of doing:
mysql> create database new_dbname;
mysql> select concat('create table
new_dbname.',TABLE_NAME,' like wings2020.',TABLE_NAME,'; insert into
new_dbname.',TABLE_NAME,' select * from ol_dbname.',TABLE_NAME,';')
from information_schema.tables where table_schema = 'old_dbname' into
outfile '/tmp/a.txt';
mysql> source /tmp/a.txt;