pipech / erpnext-docker-debian

:whale: Self-contained ERPNext Docker Image base on Debian
MIT License
197 stars 122 forks source link

Database error when Adding new site #116

Closed maovidal closed 11 months ago

maovidal commented 3 years ago

Following the steps at the production-setup everything works ok until the last step performed at the DB container (<mypassword> is redacted):

mysql -u "root" "-p<mypassword>" < "/home/init.sql"

I get this error: ERROR 1062 (23000) at line 1: Duplicate entry '10.%.%.%-_eb20b8fab81601ab' for key 'PRIMARY'

The content of the file /home/init.sql is:

UPDATE mysql.user SET host = '10.%.%.%' WHERE host LIKE '10.%.%.%' AND user != 'root';
UPDATE mysql.db SET host = '10.%.%.%' WHERE host LIKE '10.%.%.%' AND user != 'root';
FLUSH PRIVILEGES;

Could you please tell me what's wrong?

Thank you!