Restore in Debian

I want to restore my database in my debian installation dolibarr 4.0.4 but I cannot get it right :unhappy:

I already copied my dump file to this directory /usr/bin.

root@debian:/home/sark# /usr/bin/mysql sark -h localhost -P 3306 -u sark -pxxxxxxxxxxx < mysqldump_dolibarr_4.0.1_201702041415.sql
bash: mysqldump_dolibarr_4.0.1_201702041415.sql: No such file or directory
root@debian:/home/sark#

Please I really need your help… :unhappy:

Are you sure you copied the ‘mysqldump_dolibarr_4.0.1_201702041415.sql’ file to /home/sark?

1 Like

yes I am sure, I copied the file…

and I even tried restoring the database using mysql workbench but it gives me the below error…
[b]

02:20:04 PM Restoring dolibarr (llx_accounting_account)
Running: mysql --defaults-file="/tmp/tmpBo9AmT/extraparams.cnf" --host=localhost --user=root --port=3306 --default-character-set=utf8 --comments < “/home/sark/dumps/mysqldump_dolibarr_4.0.1_201702041415.sql”
ERROR 1046 (3D000) at line 22: No database selected

Operation failed with exitcode 1
02:20:04 PM Import of /home/sark/dumps has finished with 1 errors[/b]

Did you set your dolibarr 4.0.4 database as default schema in MySQL Workbench?

1 Like

No, I just followed the instruction replied by Ralphi in the below thread…

www.dolibarr.org/t/please-help-to-restore-data-base-solved/10125/1

You miss ‘–database=your_database’ in the command, I think you missed step 4: select your Dolibarr databasename, you need to select ‘Default Schema to be Imported To’

1 Like

Thank you Fappels :happy: it worked!