Page 1 of 1

Use mySQL version 8.0 - character set UTF8MB4

PostPosted:Wed Dec 15, 2021 11:34 am
by BOB
When installing OpenKM, I used the current MySql version 8.0. When creating the database with the command "CREATE DATABASE okmdb DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_bin;" the following warning is issued:
Code: Select all
"1 row(s) affected, 2 warning(s): 3719 'utf8' is currently an alias for the UTF8MB3 character set, but will be an alias for UTF8MB4 in a future release. 
Please consider using UTF8MB4 to be unique. 3778 'utf8_bin' is a collation of the deprecated UTF8MB3 character set. 
Please consider using UTF8MB4 with an appropriate collation instead. 0.015 sec"
Should or can the create command also be executed with UTF8MB4 or UTF8MB4_bin?

Re: Use mySQL version 8.0 - character set UTF8MB4

PostPosted:Sat Dec 18, 2021 9:39 am
by jllort
Should not be any problem on using UTF8MB4, here there's some explanation about difference with older UTF8 https://stackoverflow.com/questions/300 ... s-in-mysql

Re: Use mySQL version 8.0 - character set UTF8MB4

PostPosted:Mon Dec 20, 2021 5:24 pm
by BOB
Thank you for your help :D

Re: Use mySQL version 8.0 - character set UTF8MB4

PostPosted:Mon Dec 27, 2021 8:52 am
by jllort
However, consider when declaring a column in a table like varchar(100) -> you are reserving size in bytes. If you do not need 4bytes to store your language I suggest using old utf8 what uses only 3 bytes. Maybe some article about "mysql varchar bytes" will give some clue about what happens in the database storage:

* https://stackoverflow.com/questions/199 ... -and-utf-8
* https://dev.mysql.com/doc/refman/8.0/en/char.html
* https://www.mysqltutorial.org/mysql-varchar/