Correct collation in mariaDb config file

Hi there,

I need to set swedish collation in mariaDb and it seems to be correct. In mariadb.cnf file I have this…

[mysqld]

* Character sets

Default is “Latin1”, if you need UTF-8 set all this (also in client section)

#character-set-server = utf8 #collation-server = utf8_general_ci #character_set_server = utf8 #collation_server = utf8_general_ci

Collations by Tankbar

character-set-server = utf8mb4 collation-server = utf8mb4_swedish_ci init-connect = ‘SET NAMES utf8mb4’ init_connect = ‘SET collation_connection = utf8mb4_swedish_ci’ skip-character-set-client-handshake

End of collations

If I check mariaDb all variables are set, but when I run ee to create a site I got error on the database creation ‘[Error]Setting up database: ‘232’’

Any idea what’s wrong here? If I comment the lines in mariadb.cnf file all works like before.

/Regards, Micke

Bump again? Any help?

The problem occurred here …

# create MySQL database
Log.info(self, "Setting up database\t\t", end='')
Log.debug(self, "Creating database {0}".format(ee_db_name))
try:
    if EEMysql.check_db_exists(self, ee_db_name):
        Log.debug(self, "Database already exists, Updating DB_NAME .. ")
        ee_db_name = (ee_db_name[0:6] + generate_random())
        ee_db_username = (ee_db_name[0:6] + generate_random())
except MySQLConnectionError as e:
    raise SiteError("MySQL Connectivity problem occured")

I tried to create the DB from mySql prompt and no problem there and with correct collation. Why can’t EE don’t connect to the sql when I change the collation on the server?

/Thanks

@MickePalm This is a known issue with pymysql module that we are using to connect to MySQL server. Can you please revert your changes and try again ?

If I revert my changes everything is fine, but I need to use swedish collation and not unicode. Any workaround for this by pyMySql so I can use swedish collation?

Otherwise, any update from them?

/Regards, Micke

This bug still exist till now, the only work around is creating database manually.