Mysql/MariaDB – Pull remote table data matching a specific where clause

mysqldump is a really handy tool to pull data from one MySQL/MariaDB database to another. I will quickly highlight how to use to use mysqldump to pull data from a remote table matching a specific criteria into a local table.


mysqldump -u<remote-user-name> -p<remote-password> -h<remote-host-name or IP> --databases <remote-database-name> --tables <remote-table-name> --where="<complete where clause>" | mysql <local-database-name> -u<local-db-username> -p<local-db-password>

About Anand

Technology and software enthusiast
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a comment