Try ERPNext Buy Support Partners Foundation

MariaDB errors upon adding site

Please help. Im getting the below error when trying to create (bench new-site sitename.com) my site. Im running MariaDB version 10.3 on Ubuntu 16.04LTS.

Traceback (most recent call last):

reason=“MariaDB default file format is not Barracuda”
frappe.exceptions.ImproperDBConfigurationError: MariaDb is not properly configured

During handling of the above exception, another exception occurred:
Traceback (most recent call last):

pymysql.err.ProgrammingError: (1146, “Table ‘4f09518b2a2d92ac.tabSingles’ doesn’t exist”)

During handling of the above exception, another exception occurred:
Traceback (most recent call last):

TypeError: ‘ProgrammingError’ object does not support indexing

When you did your setup, you should have adjusted the mysql setup:

sudo nano /etc/mysql/my.cnf 

#Your file should contain the following (you can adjust some of the parameters to suite your needs)
[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_unicode_ci
# Set buffer pool size to 50-80% of your computer's memory
innodb_buffer_pool_size=1024M
# Set the log file size to about 25% of the buffer pool size
innodb_log_file_size=256M
innodb_log_buffer_size=128M
# the default here is 4MB, or maybe 16MB?? in more recent versions, which sometimes allows for disconnects in the middle of transactions
max_allowed_packet=64M

[mysql]
default-character-set = utf8mb4

sudo systemctl restart mysql

Once you’ve done this, you can try the create again

Thanks for the response.
I tried adding those suggested parameters on my my.cnf configuration, save it and restarted mysql service but got the following error instead –

raise Exception("Database %s already exists" % (db_name,))

Exception: Database 4f09518b2a2d92ac already exists

Below is my show db results:

±-------------------+
| Database |
±-------------------+
| 3f1a79d02de6a807 |
| 4f09518b2a2d92ac |
| information_schema |
| mysql |
| performance_schema |
±-------------------+
5 rows in set (0.001 sec)

MariaDB [(none)]> drop database 4f09518b2a2d92ac;
Query OK, 0 rows affected, 2 warnings (0.088 sec)

MariaDB [(none)]>

I have remove that said db and restarted mysql service again. Tried adding a site again with a new name now but it brought me back to the original error I have posted.

Anymore thoughts? Thanks.

What version of MariaDb are you running?

Which release of which OS? Linux? Windows?

MariaDB 10.3 , Ubuntu 16.04LTS

Drop unwanted databases and try to create new site

1 Like

Would you be able to wipe your server and install 18.04 or even 20.04?

tried your suggestion but keeps me going back to the same errors.

No I haven’t tried wiping out this server yet and use higher version. Maybe that would be my last option.

BTW, im getting this (NOTE) message when checking mysql status, not sure if it has something to do with what I am getting…

May 21 20:59:58 network systemd[1]: Starting MariaDB 10.3.23 database server…
May 21 21:00:00 network mysqld[3926]: 2020-05-21 21:00:00 0 [Note] /usr/sbin/mysqld (mysqld 10.3.23-MariaDB-1:10.3.23+maria~xenial) startin… 3926 …
May 21 21:00:07 network systemd[1]: Started MariaDB 10.3.23 database server.
Hint: Some lines were ellipsized, use -l to show in full.

I mention this because if you are not specifically tied to that server because of other work it has to do, other users, etc MariaDb 10.x is less certain to work well than if you were on Bionic or Focal.

I mention this because I have published some ERPNext installations scripts in the past week that should give you a full ERPNext installation on 20.04 in less than an hour. In creating the scripts, I wrestled with getting MariaDB to work with Barracuda and sorted it out by opting for 10.4, rather than 10.3.

The scripts are publish as a GitHub Gist.

It makes sense. I was about to try installing Bionic earlier on another machine but worked on a much urgent matter. Will try to install Focal instead tomorrow and see how it goes. I really appreciate guys like you creating scripts for easy installation thus saving more time as well. But I also like the idea of getting it work piece by piece. Cheers mate!