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?
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).
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.
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.
mysql -u root -p --database=db_name < dumpfile.sql
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With