Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MariaDB unable to import this dump file

Tags:

mariadb

I have MariaDB version 5.5.39

mysqldump -u root -p database > dumpfile.sql

Yes this is working fine; it produces a dump file.

But I am not able to import this dump file. All these commands are not working:

mysqldump -u root -p database < dumpfile.sql

mysqlimport -u root -p database < dumpfile.sql

mysql -u root -p database < dumpfile.sql

Can anybody help me please?

like image 623
Ashish Tripurwar Avatar asked Nov 04 '14 07:11

Ashish Tripurwar


People also ask

What is MariaDB dump?

2, mariadb-dump is the name of the command-line client, with mysqldump a symlink . The mysqldump client is a backup program originally written by Igor Romanenko. It can be used to dump a database or a collection of databases for backup or transfer to another database server (not necessarily MariaDB or MySQL).

How do I dump a database in MariaDB?

Step 1 — Exporting a MySQL or MariaDB Database You will need your database's name and credentials for an account whose privileges allow at least full read-only access to the database. Use mysqldump to export your database: mysqldump -u username -p database_name > data-dump.

What is MySQL dump file?

4.5.4 mysqldump — A Database Backup Program. The mysqldump client utility performs logical backups, producing a set of SQL statements that can be executed to reproduce the original database object definitions and table data. It dumps one or more MySQL databases for backup or transfer to another SQL server.


1 Answers

mysql -u root -p --database=db_name < dumpfile.sql
like image 94
Federico Razzoli Avatar answered Oct 11 '22 17:10

Federico Razzoli