I am trying to copy one database schema from one server to other. I know how to do it in same server using mysqldbcopy but i dont know how to user it while copying from one server to other.
mysqldbcopy --source=root:''@localhost --destination=root:''@localhost Test_DB:Test_DB_Copy
This is how i copy in the same server. Please help me out in copying the schema to different server using msqldbcopy command.
Best Answer
Add -u and -p as appropriate to both.
If you need to change the db name, add the suitable arg to
mysqldump
to avoid includingDROP DATABASE
andCREATE DATABASE
; plus add the new db_name on themysql
command.If you need to copy "routines", more args are needed.