dumping mysql database ignoring some tables

dumping mysql database ignoring some tables

Mysql comes with a handy tool for dumping database, like from remote server to local machine or vice versa.
Sometimes you might want to dump some tables but not the other here you go!

mysqldump -h[HOST] -u[USERNAME] --port=[PORT] -p --ignore [ignoretablename] databasename > databasename.sql

The database.sql would contain all the schema + data.
Then import it as

mysql -h[host] -u[username] -p databasename < databasename.sql

You can provide -p[password] or if you leave it as -p you would be prompted for password later which is a cool way to proceed.
ENJomYsql!

See how you would solve these known algorithm problems

Find the first occurence of number in the sorted array

binary tree problems with solution

Get maximum occurring character

Kadane’s algorithm in C – Dynamic Programming

Check if there are three numbers a, b, c giving a total T from array A

Flatten nested javascript array

Find longest palindrom from sequence of characters

Array reversal in Recurrsion

Changing decimal number to its binary equivalent

Finding missing numbers from billion sequential number list file

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*