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).

Please email me if you solved this (hamdongunner@gmail.com) I am having the same error and nothing I do solving it

Hello, I was migrating the ERP site from one server to other.

First step was to install completely ERP Next in the new server. I had that error in the installation at that time.

Unfortunately, I don’t remember what I finally did in order to get the ERP Next installed but my goal was a little different. I just got ERP Next installed. In my case database installation was superflous because after I got ERP Next installed, then I have just copied the database from one server to the other and after I changed database connection in the configuration file, it worked.

Maybe you can try to start over by deleting created database and all bench and frappe files.

Good luck!

Jaime

Am having this problem also

This will wipe your database. Are you sure you want to reinstall? [y/N]: y
MySQL root password:
Restoring Database file…
11.9KiB 0:00:00 [ 717KiB/s] [================================================================================>] 100%
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

Hello,I’m creating new site

MySQL root password:
ERROR 4047 (HY000) at line 10: InnoDB refuses to write tables with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
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

got any solution?