IN MySQL to create a copy of an existing database we need to create a separate database and dump the contents of it to the newly created database manually.
Creates a database named testdb_copy (to which we need to copy the contents of the testdb database created above).
Using the mysqldump tool, we can copy the database objects and data into a .sql file. Here, we are exporting the contents of the testdb database to a file named "testdb.sql" located at "D:\Database_backup". The (>) operator is used for exporting the database from one location to another.
Import the contents of the "testdb.sql" file into the destination database (in our case "testdb_copy").