How to clone or copy the mysql db in single command?

I want to clone my db or want export and import my mysql db using single command. Please help.
rahulk's picture

Command for Copy the DB in one go

Run the below given command, Change the variable before executing the command. mysqldump -h[HOSTNAME] -u[UNAME] -p[PASSWORD] [DBNAME] | mysql -h[HOSTNAME] -u[UNAME] -p[PASSWORD]