You can add the following parameter during compilation. configure -- prefixusrlocalmysql -- with-charsetgbk -- The with-extra-charsetsgb2312 uses the datadir parameter to specify the database storage path -- datadirdatamysqldatamakemakeinstall to restart mysql. If you do not want to recompile mysql
You can add the following parameters during compilation:
./Configure -- prefix =/usr/local/mysql -- with-charSet= Gbk ---ExTrA-charsets = gb2312
The datadir parameter can be used to specify the database storage path-datadir =/data/mysqldata
Make & make install
Restart mysql.
If you do not want to re-compile mysql to add a character set, I have no way to copy all the charsets character set files from other systemsLinuxNot even.
According to the official instructions, it is compiled into the library file. It is estimated that it will not work without recompiling.