1

I got a TYPO3 8.7 instance running over a server whose database and tables collation is utf8mb4_unicode_ci. The character set is utf8mb4.

However, MySQL over the server shows the collation for the connection is latin1_swedish_ci and collation for the server is utf8_general_ci (I guess these are parameters that come pre-configured with the hosting):

+----------------------+--------------------+
| Variable_name        | Value              |
+----------------------+--------------------+
| collation_connection | latin1_swedish_ci  |
| collation_database   | utf8mb4_unicode_ci |
| collation_server     | utf8_general_ci    |
+----------------------+--------------------+
3 rows in set (0.00 sec)

I would like to reproduce all these settings over my DDEV instance. I got the last two variable names properly configured with these settings over my .ddev/mysql/no_utf8mb4.cnf file:

collation-server = utf8_general_ci
character-set-server = utf8

But I cannot get the collation_connection as latin1_swedish_ci. How could I achieve that?

I exported my database from the hosting and imported it into ddev, but with the current configuration, every time I login into the backend, I receive an error like this:

An exception occurred while executing 'INSERT INTO sys_log (userid, type, action, error, details_nr, details, log_data, tablename, recuid, IP, tstamp, event_pid, NEWid, workspace) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [1, 255, 1, 0, 1, "User %s logged in from %s (%s)", "a:3:{i:0;s:30:\"xxx@xxx.com\";i:1;s:10:\"172.18.0.6\";i:2;s:0:\"\";}", "", 0, "172.18.0.6", 1564691070, -1, "", -99]: Field 'request_id' doesn't have a default value

Has anyone experienced this issue?

My MariaDB version over my ddev instance is 10.1.37-MariaDB.

  • I *think* the basic recipe you're looking for is https://stackoverflow.com/a/38949160/215713 – rfay Aug 01 '19 at 20:45
  • I already tried this, @rfay, but the sentences: – Sergio Catalá Aug 01 '19 at 22:06
  • I already tried this, @rfay, but the sentences first two sentences for init_connect don't take any effect. – Sergio Catalá Aug 01 '19 at 22:14
  • Another thing was mentioned by @jonaseberle in TYPO3 channel, `ddev mysql --default-character-set=__whatever__` - `ddev mysql` is in just-released v1.10, but you could always do this by running the mysql client inside the web or db container. – rfay Aug 02 '19 at 14:04

0 Answers0