1. What does the character-sets-dir option use in the MySQL configuration file ( my.ini )?

  2. As I understand it, the value of this parameter is the path to the folder with the set of encodings, and does this mean that other encodings that are not included in the folder will not be supported by the MySQL server?

For example, if I have the following parameter value set:

[mysqld]

character-sets-dir = "C: / Program Files / MySQL / MySQL Server 5.0 / share / charsets /"

And in the folder C: / Program Files / MySQL / MySQL Server 5.0 / share / charsets / there is no file with utf-8 encoding, then when inserting data, preceded by the command

 /*!40101 SET NAMES utf8 */; 

Is the data saved in latin1 or some other default encoding, but not in UTF-8 ?

    1 answer 1

    This directory contains the Index.xml file in this file lists all encodings and their aliases supported by the server. Some of the encodings are external and are in *.xml files, some are internal (for example, utf-8) and compiled into the server itself.

    If you execute the SET NAMES command with indication of the encoding unknown to the server

     SET NAMES qqq 

    then the server will return an error

    ERROR 1115 (42000): Unknown character set: 'qqq'