apache-tomcat-6.0.32.tar.gz
jre-6u33-linux-x64-rpm.bin
jdk-6u33-linux-x64-rpm.bin
MySQL-client-community-6.0.9-0.rhel5.x86_64.rpm
MySQL-server-community-5.1.63-1.rhel5.x86_64.rpm
全部安装完毕后。就行啦。
mysql该字符集
mysql> set character_set_client=utf8;
Query OK, 0 rows affected (0.00 sec)
mysql> set character_set_connection=utf8;
Query OK, 0 rows affected (0.00 sec)
mysql> set character_set_database=utf8;
Query OK, 0 rows affected (0.00 sec)
mysql> set character_set_results=utf8;
Query OK, 0 rows affected (0.00 sec)
mysql> set character_set_server=utf8;
Query OK, 0 rows affected (0.00 sec)
mysql> set character_set_system=utf8;
Query OK, 0 rows affected (0.01 sec)
mysql> set collation_connection=utf8;
Query OK, 0 rows affected (0.01 sec)
mysql> set collation_database=utf8;
Query OK, 0 rows affected (0.01 sec)
mysql> set collation_server=utf8;
Query OK, 0 rows affected (0.01 sec)
查看:
mysql> show variables like 'character_set_%';
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.03 sec)
mysql> show variables like 'collation_%';
+----------------------+-----------------+
| Variable_name | Value |
+----------------------+-----------------+
| collation_connection | utf8_general_ci |
| collation_database | utf8_general_ci |
| collation_server | utf8_general_ci |
+----------------------+-----------------+
3 rows in set (0.04 sec)
default-character-set=gbk #或gb2312,big5,utf8
然后重新启动mysql
运行->services.msc->停止MySql->启动 OK
或
/etc/init.d/mysql restart
或用其他方法重新启动,就生效了。
[编辑]
Unix平台
linux下的mysql配置文件是my.cnf,一般是/etc/my.cnf,如果找不到可以用find命令找一下:
find / -iname my.cnf
在这个文件里面加上
default-character-set=gbk #或gb2312,big5,utf8
然后重新启动mysql
net stop mysql
net start mysql