Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default mysql collation to utf8mb4_general_ci #2223

Merged
merged 1 commit into from May 22, 2020

Conversation

rfay
Copy link
Member

@rfay rfay commented Apr 27, 2020

The Problem/Issue/Bug:

In TYPO3 slack we studied extensively why a few collation variables weren't the utf8mb4_general_ci variables we expected.

How this PR Solves The Problem:

  • change collation-server, which also results in the default database creation with the correct collation.
  • add init_connect='SET collation_connection = utf8mb4_unicode_ci', which auto-changes the client connection.

Manual Testing Instructions:

  • Delete your existing database or create a new project. mkdir testcoll && cd testcol && ddev config --project-type=php && ddev start
  • echo "SHOW VARIABLES LIKE 'coll%';" | ddev mysql

You should see all collation variables being utf8mb4_general_ci

$ echo "SHOW VARIABLES LIKE 'coll%';" | ddev mysql
mysql: [Warning] Using a password on the command line interface can be insecure.
Variable_name	Value
collation_connection	utf8mb4_unicode_ci
collation_database	utf8mb4_general_ci
collation_server	utf8mb4_general_ci

You should see

Automated Testing Overview:

Related Issue Link(s):

Release/Deployment notes:

@rfay
Copy link
Member Author

rfay commented Apr 27, 2020

@jeffsheltren would appreciate your review of this one, thanks!

Copy link
Contributor

@jeffsheltren jeffsheltren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@rfay
Copy link
Member Author

rfay commented Apr 28, 2020

Thanks @jeffsheltren - this will go into v1.15+

@rfay
Copy link
Member Author

rfay commented May 1, 2020

@rfay rfay force-pushed the 20200427_mysql_collation branch from f73a333 to f12519f Compare May 1, 2020 13:29
@rfay rfay merged commit 447c2b7 into ddev:master May 22, 2020
@rfay rfay deleted the 20200427_mysql_collation branch May 22, 2020 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants