Useful of character_set_filesystem variable and character_set_system variable in MySQL?

hello,everyone
i am confused that what is the useful of character_set_filesystem variable and character_set_system variable in MySQL?,as if we rarely set character_set_filesystem variable and character_set_system variable,

mysql> show variables like ‘character_set_filesystem’;
±-------------------------±-------+
| Variable_name | Value |
±-------------------------±-------+
| character_set_filesystem | binary |
±-------------------------±-------+
1 row in set (0.00 sec)

mysql> show variables like ‘character_set_system’;
±---------------------±------+
| Variable_name | Value |
±---------------------±------+
| character_set_system | utf8 |
±---------------------±------+
1 row in set (0.00 sec)

Hi zhouke, quoting the manual here for character_set_filesystem:

This variable is used to interpret string literals that refer to file names, such as in the LOAD DATA and SELECT … INTO OUTFILE statements and the LOAD_FILE() function. Such file names are converted from character_set_client to character_set_filesystem before the file opening attempt occurs. The default value is binary, which means that no conversion occurs.

So it looks like it is useful in edge cases only. Regarding the character_set_system that is used internaly by the server and not meant to be modified.

1 Like