Cloning or duplicating a database in mysql

First dump the database:

mysqldump -u root -p DBNAME > db1

Enter mysql and create the target database:

mysql> CREATE DATABASE 'episodescopy';

Then import it into a new database:

mysql -u root -p episodescopy < db1

Alternate solution:
Create target database:

mysql> CREATE DATABASE 'episodescopy';

Now copy using a utility:

mysqldbcopy --source=root:[email protected] --destination=root:[email protected] episodes episodescopy

It requires installation of mysqldbcopy:

apt install mysql-utilities