Tag: import

MySQL partial import

MySQL partial import

#mysql #import

Here’s the situation. You have a dumpfile called mysql.dmp which contains a whole MySQL database dump. However you only need to import one table (or anything, but only a portion of that dumpfile). Because MySQL dumps are simply SQL scripts, we can use sed in order to extract only the portion of the SQL instructions we want. Let say the name of ... Read more

20 Sep 2015 - less than 1 minute read
Data export/import on MySQL

Data export/import on MySQL

#database #mysql #import #export

MySQL provides you with a lot of flexibility when it comes to import or export data between databases. Let’s examine a few possibilities to export/import data: To export a whole database The following command will export a whole MySQL database on a sql file: mysqldump -u user DB_NAME > /tmp/file.sql To export a single table The followin... Read more

20 Feb 2014 - less than 1 minute read