By default, mysql is installed on Ubuntu with the character set latin1. 1. showcharacterset is supported for viewing character sets; 2. showvariableslikequot; ch
By default, mysql is installed on Ubuntu with the character set latin1. 1. show character set is supported for viewing character sets; 2. show variables like quot; ch
By default, mysql is installed on Ubuntu with the character set latin1.
1. View character set support
Show character set;
2. View character set variables
Show variables like "character_set % ";
3. Set the default Character Set
To solve garbled characters, the easiest way is to modify the default character set. Modify the default character set to utf8:
Find/etc/mysql/my. cnf and add default-character-set = utf8 under [mysqld ].
Or if you have installed the desktop system, you can use mysqladmin to modify the startup parameter. In the Advanced option, change Def. CharSet to utf8 and save and restart. However, you cannot modify this option. You can use the root user to open my. cnf for modification.
4. start, stop, and restart in linux
/Etc/init. d/mysql start/stop/restart