In MySQL I want to clone certain databases. Is there such a thing as a
CREATE DATABASE LIKE
command?
I know
If you want to clone a database, my_database
for example, you'll want to run a mysql query and then run a command in the linux terminal:
mysql> CREATE DATABASE my_database_copy;
linux terminal (on the machine with the database):
mysqldump -u username -p my_database | mysql -u username -p my_database_copy
From there you'll likely get 2 "Enter password:" prompts....just input your password, press enter, and wait :)