It took 1 days to successfully install the MySQL 5.0.27 ICC version on Debian Etch Linux and use JDBC to test Chinese success!
The key to the Chinese problem is to use all UTF-8 encoding, MySQL 5 release support UTF-8, but the default is Latin1,java in the internal use of all Unicode, so to ensure that the JSP page to UTF-8 encoding, JDBC driver with the official connector4j 5.0.4, in resin 3.1/spring 2.0/hibernate 3.2 Environment Test Chinese normal.
1. Download "mysql-standard-5.0.27-linux-i686-icc-glibc23.tar.gz" and recommend the ICC version, which is said to improve performance over GCC 10-20%
2. Copy to/usr/local/, extract: Tar zxvf mysql-standard-5.x....tar.gz
3. Add users and Groups MySQL:
Groupadd MySQL
useradd-g MySQL MySQL
4. Create a symbolic connection:/usr/local # ln-s mysql-standard-5.x ... MySQL
5. CD MySQL, current directory changed to/usr/local/mysql/
6. Run Footsteps Initialize the database:./scripts/mysql_install_db--user=mysql
7. Set Permissions:
/usr/local/mysql # Chown-r Root.
/usr/local/mysql # chown-r MySQL Data
/usr/local/mysql # chgrp-r MySQL
--------------------------------------------------------------------------------
8. Create and modify/etc/my.cnf as needed, refer to configuration:
[Mysqld]
# Set defaults to InnoDB table, support transactions:
Default-storage-engine=innodb
# Set the default character set UTF-8:
Character-set-server=utf8
Collation-server=utf8_general_ci
Default-character-set=utf8
# Disable BDB:
Skip-bdb
9. Start MySQL:
/usr/local/mysql/bin #/mysqld_safe--user=mysql &
10. Initialize Root password:
/usr/local/mysql/bin #/mysqladmin-u root-p password "password-of-root"
Enter Password: < Enter old password, press enter> directly
--------------------------------------------------------------------------------
11. Create a database with root login:
/usr/local/mysql #./mysql-u root-p
Enter Password:password-of-root