mysql 預設 utf8
vi /etc/my.cnf
[mysqld]datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
skip-innodb
set-variable=local-infile=0
# 取消網路
skip-networking
# 下面設定預設字型 utf8
default-character-set=utf8
[mysql.server]
user=mysql
basedir=/var/lib
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[mysql]
# 下面設定預設字型 utf8
default-character-set=utf8
迴響
mysql 編碼問題
只要在 php 語法中加入 mysql_query("SET NAMES utf8") //用 utf8 編碼 mysql_query("SET NAMES big5") //用 big5 編碼mysql 編碼問題 utf-8
很奇怪,今天在測試 mysql utf-8 編碼格式時,如果用 mysql_query("SET NAMES utf8")時中文會亂碼,可是用 mysql_query("SET NAMES utf-8")時中文正常,而且在加掛 Optimizer 時,好像會有不立刻更新的問題,拿掉或重新啟動 apache就好了
我只是愛你的有趣博客
我想說,你真的幫助我理解的主題 mysql ?? utf8 | ??
mysql 預設 utf8 | 豬窩
Hi there, I enjoy reading all of your article. I wanted to write a little comment to support you.
mysql 預設 utf8 | 豬窩
You really make it appear so easy with your presentation however I find this topic to be
really something which I feel I would by no means understand.
It kind of feels too complex and extremely vast for me.
I am having a look ahead to your next submit, I'll try to get the grasp of it!