- 浏览: 1315363 次
- 性别:
- 来自: 成都
文章分类
- 全部博客 (471)
- 原创文章 (4)
- Database (84)
- J2SE (63)
- Web (26)
- Javascript (30)
- Lucene (11)
- os (13)
- 算法 (8)
- Webservice (1)
- Open projects (18)
- Hibernate (18)
- Spring (15)
- Css (2)
- J2ee (2)
- 综合技术 (18)
- 安全管理 (13)
- PatternsInJava (27)
- NIO (5)
- Ibatis (2)
- 书籍收藏 (1)
- quartz (7)
- 并发编程 (15)
- oracle问题 (2)
- ios (60)
- coco2d-iphone (3)
- C++ (6)
- Zookeeper (2)
- golang (4)
- animation (2)
- android (1)
最新评论
-
dandingge123:
【引用】限制UITextField输入长度的方法 -
qja:
...
对List顺序,逆序,随机排列实例代码 -
安静听歌:
现在在搞这个,,,,,哎~头都大了,,,又freemarker ...
通用大型网站页面静态化解决方案(一) -
springdata-jpa:
java quartz定时任务demo教程源代码下载,地址:h ...
Quartz 配置参考 -
马清天:
[b][/b][list][*]引用[u][/u][/list ...
通用大型网站页面静态化解决方案(一)
进入mysql console:
输入
mysql>show variables like 'character%';
+--------------------------+-----------------------------------------------------+
| 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/local/mysql-5.1.30-osx10.5-x86/share/charsets/ |
+--------------------------+-----------------------------------------------------+
8 rows in set (0.00 sec)
如果有的项目不是utf8,我们需要进行设置
编辑/etc/my.cnf,如果没有该文件,从mysql的安装目录的support-files copy一个my-small.cnf到/etc下,更名为my.cnf
sudo cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf
sudo vi /etc/my.cnf
加入红色字体的部分,保存后,重启mysql,重新执行show命令,将会发现应该都是utf8
注意default-character-set = utf8,等号两边要有空格,很重要,不然配置文件不生效
# Example MySQL config file for small systems.
#
# This is for a system with little memory (<= 64M) where MySQL is only used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /usr/local/mysql/data) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock
default-character-set = utf8
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-locking
key_buffer = 16K
max_allowed_packet = 1M
table_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 64K
init-connect = 'SET NAMES utf8'
character-set-server = utf8
collation-server = utf8_general_ci
default-character-set = utf8
# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (using the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking
server-id = 1
# Uncomment the following if you want to log updates
#log-bin=mysql-bin
# binary logging format - mixed recommended
#binlog_format=mixed
# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /usr/local/mysql/data/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /usr/local/mysql/data/
#innodb_log_arch_dir = /usr/local/mysql/data/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
转自 http://jeffreyhsu.iteye.com/blog/348263
[isamchk]
key_buffer = 8M
sort_buffer_size = 8M
[myisamchk]
key_buffer = 8M
sort_buffer_size = 8M
[mysqlhotcopy]
interactive-timeout
发表评论
-
mysql主从热备配置(含innodb)终极版
2012-12-25 13:10 2591转自 http://blogread.cn/it/articl ... -
sqlite3中的数据类型
2012-12-10 21:37 1268(转)http://www.cnblogs.com/kfqco ... -
Mac下MySql卸载方法
2012-09-10 23:57 1019Mac下MySql卸载方法 mac下mysql的D ... -
ON DUPLICATE KEY UPDATE
2012-08-07 01:47 1052(转自)http://blog.csdn.net/kesaih ... -
MySQL单列索引和组合索引的区别介绍
2012-08-07 01:31 1068(转自)http://blog.cs ... -
centos下MySQL主从同步配置
2012-08-03 13:14 1521(转自)http://apps.hi.baidu.com ... -
mac系统登陆用户忘记密码
2012-06-23 18:27 1277mac系统登陆用户忘记密码,如何进入系统呢? 其实很简 ... -
sql语句中left join、inner join中的on与where的区别
2012-06-13 13:24 1228table a(id, type): id t ... -
分组取前N记录
2012-05-31 16:24 1093(转)http://blog.csdn.net/ac ... -
如何一条sql语句取出分组数据中值最大的
2012-05-30 23:59 2322--按某一字段分组取最大(小)值所在行的数据(2007-10- ... -
存储过程与函数的区别
2011-09-28 19:35 1127... -
cmd 命令学些
2011-09-03 21:28 1179net use $">\\ip\ipc$Con ... -
RMAN备份方案
2011-07-21 10:29 2027RMAN备份方案 RMAN也可以进行联机备份,而且备份与恢 ... -
oracle
2011-04-06 17:46 1019学习笔记 -
PLSQL Developer + Oracle客户端简易安装方法
2011-03-17 00:10 14332Oracle 10g绿色客户端 pl ... -
SELECT INTO FROM与INSERT INTO SELECT
2011-01-26 15:52 33751.INSERT INTO SELECT语句 ... -
浅谈unique列上插入重复值的MySQL解决方案
2011-01-25 11:33 1753本文的unique列上插入重复值解决方案,主要基于MySQL平 ... -
:Oracle 中对Merge语句的增强 和去重复新增
2011-01-25 11:11 2284在Oracle 10g之前,merge语句支持匹配更新和不匹配 ... -
单行函数(仅对单个表达式或一行进行处理)
2011-01-23 18:49 1235例如:select sum(qty) from sales ... -
oracle中的事务控制命令
2011-01-23 18:45 2018事务提交有显示提交:使用commit命令来提交所有未提交的更新 ...
相关推荐
10.6. 用于元数据的UTF8 10.7. 与其它DBMS的兼容性 10.8. 新字符集配置文件格式 10.9. 国家特有字符集 10.10. MySQL支持的字符集和校对 10.10.1. Unicode字符集 10.10.2. 西欧字符集 10.10.3. 中欧字符集 10.10.4. ...
10.6. 用于元数据的UTF8 10.7. 与其它DBMS的兼容性 10.8. 新字符集配置文件格式 10.9. 国家特有字符集 10.10. MySQL支持的字符集和校对 10.10.1. Unicode字符集 10.10.2. 西欧字符集 10.10.3. 中欧字符集 10.10.4. ...
10.6. 用于元数据的UTF8 10.7. 与其它DBMS的兼容性 10.8. 新字符集配置文件格式 http://doc.mysql.cn/mysql5/refman-5.1-zh.html-chapter/(第 9/24 页)2006-11-02 19:12:13 MySQL 5.1 Reference Manual 10.9. ...
10.6. 用于元数据的UTF8 10.7. 与其它DBMS的兼容性 10.8. 新字符集配置文件格式 10.9. 国家特有字符集 10.10. MySQL支持的字符集和校对 10.10.1. Unicode字符集 10.10.2. 西欧字符集 10.10.3. 中欧字符集 10.10.4. ...
10.6. 用于元数据的UTF8 10.7. 与其它DBMS的兼容性 10.8. 新字符集配置文件格式 10.9. 国家特有字符集 10.10. MySQL支持的字符集和校对 10.10.1. Unicode字符集 10.10.2. 西欧字符集 10.10.3. 中欧字符集 10.10.4. ...
10.6. 用于元数据的UTF8 10.7. 与其它DBMS的兼容性 10.8. 新字符集配置文件格式 10.9. 国家特有字符集 10.10. MySQL支持的字符集和校对 10.10.1. Unicode字符集 10.10.2. 西欧字符集 10.10.3. 中欧字符集 ...
10.6. 用于元数据的UTF8 10.7. 与其它DBMS的兼容性 10.8. 新字符集配置文件格式 10.9. 国家特有字符集 10.10. MySQL支持的字符集和校对 10.10.1. Unicode字符集 10.10.2. 西欧字符集 10.10.3. 中欧字符集 ...
用于元数据的UTF8 10.7. 与其它DBMS的兼容性 10.8. 新字符集配置文件格式 10.9. 国家特有字符集 10.10. MySQL支持的字符集和校对 10.10.1. Unicode字符集 10.10.2. 西欧字符集 10.10.3. 中欧...
10.6. 用于元数据的UTF8 10.7. 与其它DBMS的兼容性 10.8. 新字符集配置文件格式 10.9. 国家特有字符集 10.10. MySQL支持的字符集和校对 10.10.1. Unicode字符集 10.10.2. 西欧字符集 10.10.3. 中欧字符集 10.10.4. ...
10.6. 用于元数据的UTF8 10.7. 与其它DBMS的兼容性 10.8. 新字符集配置文件格式 10.9. 国家特有字符集 10.10. MySQL支持的字符集和校对 10.10.1. Unicode字符集 10.10.2. 西欧字符集 10.10.3. 中欧字符集 10.10.4. ...
数据库 由于我们正在管理多个项目,因此需要使用一个容器,该容器可以从我们的任何应用程序容器访问。...使用 (Windows), (Mac OS X)之类的工具或容器本身内的CLI手动创建utf8mb4数据库。 docker exec
适用于Windows Server Familiy、Linux、FreeBSD、Unix、Mac OS等多种操作系统; 多模板: 内置多套绚丽精美的模板,可任意设定,采用Smarty模板技术,使程序与模板完全隔离,可给众多爱好于美工设计 的朋友制造...
ODBC 3.x as well as ODBC 2.5 (for legacy applications) compliant data sources in MS Windows, Linux/Unix/Mac OS X (via unixodbc and iODBC driver managers): Sybase, MySQL, PostgreSQL, EnterpriseDB, ...
适用于Windows Server Familiy、Linux、FreeBSD、Unix、Mac OS等多种操作系统; 多模板: 内置多套绚丽精美的模板,可任意设定,采用Smarty模板技术,使程序与模板完全隔离,可给众多爱好于美工设计 的朋友制造...