I encountered this error after entering mySQL password. How to resolve this?
sh: 1: cannot open /home/frappe/back.sql: Permission denied
Database not installed, this can due to lack of permission, or that the database name exists.
Check your mysql root password, or use --force to reinstall
I used this code to restore.
bench --site [sitename] --force restore /path/to/SQLFILE
from which user you are executing the command ?
switch to frappe user su frappe
and then the above command
Did the following. Same result.
frappe@erptest-VirtualBox:~/frappe-bench$ bench --site site1.local --force restore /home/frappe/back.sql
MySQL root password:
sh: 1: cannot open /home/frappe/back.sql: Permission denied
Database not installed, this can due to lack of permission, or that the database name exists.
Check your mysql root password, or use --force to reinstall
frappe@erptest-VirtualBox:~/frappe-bench$
goto /home/frappe
and post output for ls -l
sudo chown frappe:frappe back.sql
sudo chmod 644 back.sql
bench --site site1.local --force restore /home/frappe/back.sql
1 Like
I think it worked. But I encountered this.
frappe@erptest-VirtualBox:~/frappe-bench$ bench --site site1.local --force restore /home/frappe/back.sql
MySQL root password:
*** Scheduler is disabled ***
frappe@erptest-VirtualBox:~/frappe-bench$
Seems backup has been restored.
to enable scheduler bench enable-scheduler site1.local