Try ERPNext Buy Support Partners Foundation

Error while running bench new-site site1.local

I installed all the dependencies and now I’m just following steps from

I’m getting below error -
For key character_set_server. Expected value utf8mb4, found value latin1
For key collation_server. Expected value utf8mb4_unicode_ci, found value latin1_swedish_ci


Creation of your site - site1.local failed because MariaDB is not properly
configured. If using version 10.2.x or earlier, make sure you use the
the Barracuda storage engine.

Please verify the settings above in MariaDB’s my.cnf. Restart MariaDB. And
then run bench new-site site1.local again.

Has someone faced this issue before? Can someone please help?

It has still created site1.local directory though

These steps from Hitchhiker’s guide should help:

Next you’ll need the MySQL database development files

$ sudo apt-get install libmysqlclient-dev

You also need to edit the mariadb configuration (although the guide in README doesn’t mention this, you’ll face an error message asking you to do exactly this if you follow the README. So you might as well go ahead and do this)

$ sudo nano /etc/mysql/my.cnf

And add this to the file

character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

default-character-set = utf8mb4

(Now press (Ctrl-X) to exit!) Finally restart the mysql server and you’ll be good to go!

$ sudo service mysql restart

1 Like

It got resolved, but i did not have to run sudo apt-get install libmysqlclient-dev

Also I edited /etc/mysql/mariadb.cnf instead of my.cnf… it former imports the later

But your solution could have worked as well probably

1 Like