Cloning a MySQL database to Another DB
For details official documentation Copying MySQL Databases
First you need to create a DB where the clone will happen
CREATE DATABASE clone_db;
Cloning a MySQL database on the same MySql instance
Now for mysqldump and mysql import same command
mysqldump -u user_name --password=user_password original_db | mysql -u user_name -p clone_db
Here
original_db will be replace with the main db table
& clone_db will be the db where the db will clone
Note : after hitting with this command it will ask you the password again and just give the same password, and it will work.
For Example :
CREATE DATABASE employee_directory_new;
mysqldump -u root --password=1234 employee_directory | mysql -u root -p employee_directory_new