Table 'tabDefaultValue' missing Error When creating new site

Hi Dears,
I keep getting this error “Table ‘tabDefaultValue’ missing” and here is the full error body

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

The command I was running is: bench new-site library.test inside the bench folder.

I’ve tried to find a similar issue opened but couldn’t

My os is MacOS BigSur 11.4 - using Mac Air M1

@Hamdon_Gunner have a similar issue, but if you do docker installation of ERP it works like charm, please let me know if you find a solution.

what’s the mariadb version?

I face this error with 10.6.3-MariaDB

In case of docker it is using MariaDB 10.3

❯ bench new-site testdevelop.localhost --install-app erpnext --admin-password admin --force
WARN: bench is installed in editable mode!

This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`

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

I replaced ROW_FORMAT=COMPRESSED to ROW_FORMAT=DYNAMIC everywhere and it worked.

1 Like

Hi, Revant thanks for the explanation. I am facing this error while creating new site and this is my

my.cnf file

[mysqld]
innodb-file-format=barracuda
innodb-file-per-table=1
innodb-large-prefix=1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4

[mysql]
default-character-set = utf8mb4

I really dont understand what I am missing

Downgrade your MariaDB to less than 10.6 or change the frappe framework code.
You can find and replace ROW_FORMAT=COMPRESSED to ROW_FORMAT=DYNAMIC

Try reverting back the changes and using the site. Try to create a custom doctype for the site once the code changes are reverted.

3 Likes

What file does contain this? Thanks

1 Like

Hi did you find where to change those options?

You’re looking for a MariaDB configuration file that is (usually) named my.cnf

It’s normally located here:
/etc/mysql/my.cnf

or here:
/etc/my.cnf

Open that file with a text editor. There should be a section named [mysqld]. Somewhere in this, add a line as follows:

[mysqld]
...
...
innodb_read_only_compressed = FALSE

Once you’re done, restart the MariaDB service, to make the new setting take effect.

To reiterate, this change is only necessary on MariadDB 10.6+

4 Likes

Hello, I’ve set a solution for this issue the one that worked for me, please check it

In the my.cnf config file, you need to add the following line to resolve the issue.

[mysqld]
innodb-read-only-compressed=OFF

Restart mysql server after updating the config.

tried above setting and also tried
[mysqld]
skip-innodb-read-only-compressed

continue to get same error message. verified that above setting was being loaded with the # myslqd --print-defaults command. Also verified:

MariaDB [(none)]> SHOW VARIABLES LIKE 'innodb_read_only_compressed';
+-----------------------------+-------+
| Variable_name               | Value |
+-----------------------------+-------+
| innodb_read_only_compressed | OFF   |
+-----------------------------+-------+

AS @revant_one suggested - the solution lies in modifying frappe framework and not in Mariadb setting? Any suggestions?

Was my problem - on a fresh install of erpnext in Ubuntu 20.04 with mariadb on a remote server, still need to run the command on ERP server : apt install mariadb-client && apt install libmariadbclient-dev (for my future reference)

the correct setting for mariadb 10.6 is as highlighted above:

3 Likes

Actually, for the benefit of the entire community. I probably would have gone on a WILD goose chase if not for this

Thank you, thank you, thank you :grinning:

sudo apt install mariadb-client && sudo apt install libmariadbclient-dev` work for me

For those who faced this issue as I,

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 t reinstall

you have to install mysql client in your host machine. When using a remote database such as mariadb docker image like i did,

1 Like

I am stuck with this error for almost a week now, on ubuntu 22.04, I tried to change the my.cnf file as mentioned, I installed the client and still stuck with same error, it is a fresh installation. any help?

I got the solution, Make sure to comment all [server], [mysqld] and [mysq] sections in 50-server.cnf and keep them in my.cnf, because two files conflicts together, then reinstall sql using
$sudo mysql_secure_installation and restart your machine.

let me know if you are still facing the issue

I am still facing this issue, please guide me.

I’m getting this error

mysql: unknown variable 'pid-file=/run/mysqld/mysqld.pid'
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

please help me resolve this