In this question: Running/Starting MySQL without installation on Windows, I have asked a question in the comment:
I see in many tutorials, there is a config file named my.ini
. But in Aj Tech Developer
's answer, this my.ini
file is not needed, why?
Here is a my.ini
file I used for my configuration:
[client]
default-character-set=utf8
[mysqld]
port = 3306
max_connections=20
character-set-server=utf8
default-storage-engine=INNODB
Question 1: It looks like if this file does not exist, the Mysql can still start correctly. So, is that file necessary?
Question 2:
Whey I try to create a database in the running Mysql, it said the server side default collation is utf8mb3_general_ci
, while in some discussion(mysql - What's the difference between utf8_general_ci and utf8_unicode_ci? - Stack Overflow), it is suggested that the utf8mb4_general_ci
is preferred. So, I'm not sure what are their difference.
Thanks.
EDIT
The server side collation option utf8mb3_general_ci
is set by the my.ini
file I put in the <root>
folder of the MySQL. If I remove this my.ini
file, and restart MySQL again. After that, I try to create a new database, I see the server side default collation is utf8mb4_0900_ai_ci
now.