我的wom2.2服务器上的我的Joomla3.0正常工作,直到我安装了扩展社区构建器,我在此扩展中输入的每个汉字都被证明是问号。在检查数据库时,我发现社区生成器创建的表没有使用utf-8字符集,因此我将这些表的字符集更改为utf8_general_ci,如下所示。 根据stackoverflow.com上的其他帖子,我甚至修改了my.ini文件,看起来像是
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock
default-character-set=utf8
# Here follows entries for some specific programs
# The MySQL server
[wampmysqld]
port = 3306
socket = /tmp/mysql.sock
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
basedir=d:/wamp/bin/mysql/mysql5.5.24
log-error=d:/wamp/logs/mysql.log
datadir=d:/wamp/bin/mysql/mysql5.5.24/data
skip-federated
# Replication Master Server (default)
# binary logging is required for replication
log-bin=mysql-bin
# binary logging format - mixed recommended
binlog_format=mixed
# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id = 1
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
default-character-set=utf8
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
[mysqld]
port=3306
collation-server = utf8_general_ci
init-connect='SET NAMES utf8'
character-set-server = utf8
但是,中文字符仍然被转换为问号,当我尝试在phpmyadmin中直接将这些表的值设置为中文字符时,它返回了一条错误消息“#1366字符串值不正确”。现在对mysql数据库知识非常有限,我陷入困境。 任何帮助都非常有用!