Try ERPNext Try Frappe Cloud Buy Support Partners Foundation

Database tables are not created when creating a new site

Hello, I am creating a new site with this command bench new-site erp.example.com

When I run it, this error is shown:

[frappie@node4037 frappe-bench]$ bench new-site erp.example.com
MySQL root password:
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1171 (42000) at line 235: All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead
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
[frappie@node4037 frappe-bench]$

Of course root password is right, and even, the database is created with only 5 tables.

How can I solve this?

Thanks
Jaime

I am having a similar issue, when trying to install new-site with a remote MariaDB Server (Specified in common_site_config.json) I get: Table ‘tabDefaultValue’ missing in the restored site. Database not installed correctly, this can due to lack of permission, or that the database name exists. Check your mysql root password, validity of the backup file or use --force to reinstall
When interrogating the DB Server, the DB and User are created but the DB is empty (No Tables).