The following Linux runs Ubuntu7.10MySQL as 6.0a. The default Character Set installed in MySQL is liant1. To use uft8, you must set it every time. For convenience, you can change the default character set to uft8 as follows: 1. Find and edit the file my. cnf, which is located under/etc. Sudogedit/etc/my. cnf2, locate the [MySQLd] section, modify or add the following lines: default_charact
The following Linux runs Ubuntu 7.10 MySQL as 6.0a.
The default Character Set installed in MySQL is liant1. To use uft8, you must set it every time. For convenience, you can change the default character set to uft8.
The method is as follows:
1. Find and edit the file my. cnf, which is located under/etc.
Sudo gedit/etc/my. cnf
2. Find the [MySQLd] section,
Modify or add the following lines:
Default_character_set = utf8
3. Find the [MySQL] section,
Modify or add the following lines:
Default_character_set = utf8
4. Restart the MySQL service.
Disable the service first:
MySQLadmin-uroot-p password shutdown
Restart the service:
Sudo/usr/local/MySQL/bin/MySQLd_safe -- user = MySQL &
Above:
/Usr/local/MySQL/bin/is the folder where MySQLd_safe is located. installation location
-- User = MySQL is written to MySQL users for startup.
Go to MySQL
Run: show variables like 'character %'
Let's see the result!