content_image/823393.jpg content_image/823394.jpg content_image/823395.jpg
<img src='content_image/823393.jpg'>

The character set used by the default database. The server sets this variable whenever the default database changes. If there is no default database, the variable has the same value as character_set_server . 

As of MySQL 8.0.14, setting the session value of this system variable is a restricted operation. The session user must have privileges sufficient to set restricted session variables. See Section 5.1.9.1, “System Variable Privileges” . 

The global character_set_database  and collation_database  system variables are deprecated; expect them to be removed in a future version of MySQL. 

Assigning a value to the session character_set_database  and collation_database  system variables is deprecated and assignments produce a warning. Expect the session variables to become read-only (and assignments to them to produce an error) in a future version of MySQL in which it remains possible to access the session variables to determine the database character set and collation for the default database. 

• character_set_filesystem 

<img src='content_image/823394.jpg'>

The file system character set. 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. For systems on which multibyte file names are permitted, a different value may be more appropriate. For example, if the system represents file names using UTF-8, set character_set_filesystem  to ’utf8mb4’ . 

As of MySQL 8.0.14, setting the session value of this system variable is a restricted operation. The session user must have privileges sufficient to set restricted session variables. See Section 5.1.9.1, “System Variable Privileges” . 

• character_set_results 

<img src='content_image/823395.jpg'>

