It’s quite simple really, I just can’t figure out the syntax.
I want to replicate my server setup on another server.
I can dump all my databases with
mysqldump -uroot -p --alldatabases > all.sql
But how do I import ALL of those into a brand new mysql setup on another server?
if the database servers are both near enough the same version, you could simply rsync the /var/lib/mysql directory over.
rsync /var/lib/mysql root@destination.server.com:/var/lib/ -aEdit: Please note that there are some issues with this approach which require some additional steps:
http://verens.com/2016/05/11/quick-method-to-clone-a-mysql-database/