MySQL Forums
Forum List  »  Newbie

Re: I use SQLyog create a database by chinese
Posted by: Zach Ellis
Date: October 18, 2023 02:44PM

Hello Arthas Neo,

I'm new to mysql dba so if someone more experienced comes go with them.

to see which Character Sets and Collations the server are using you might need to change the variables to one that supports Chinese characters.

sql to view said variables

show global variables like '%character%'; show global variables like '%collation%';

Chapter 10 Character Sets, Collations, Unicode from the manual give it a read to further understand Character Sets, Collations and Unicode only skimmed through it.

links above. This might explain the @4e00@4f53@5316@5e73@53f0@4e8b@9879@6c47@603b name which to my limited understanding the @numers/letters is the Unicode character for the Chinese characters for the name that you used for the database and table.

from the manual character_set_filesystem

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,
“System Variable Privileges”.

this variable might change the file names that are in the database or just target files outside the database dosent explicitly say which. But multi-byte languages are referring to Asian languages so changing this variable might change the current Unicode name into the Chinese characters.

from the manual A.11 MySQL 8.0 FAQ: MySQL Chinese, Japanese, and Korean Character Sets

If you cannot control the server settings, and you have no idea what setting your underlying
computer uses, try changing to a common character set for the country that you're in gb18030, gb2312 or gbk = People's Republic of China; ucs2 or utf8 = anywhere. Usually it is necessary
to change only the client and connection and results settings. The SET NAMES. statement
changes all three at once. For example:
SET NAMES 'big5';
Once the setting is correct, you can make it permanent by editing my.cnf or my.ini. For
example you might add lines looking like these:



If you are going to change any of these variables take a backup of your database both logical and physical.

Hope this helps,
Zach Ellis

Options: ReplyQuote

Written By
Re: I use SQLyog create a database by chinese
October 18, 2023 02:44PM

Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.