MySQL+VBB问题:mysql 错误: mysql 错误: Illegal mix of collations (latin1_bin,IMPLICIT) and (latin1_s

类别:编程语言 点击:0 评论:0 推荐:
续上篇文章,自从升级 MySQL 到 4.1.8 之后,我的VBB又有了新的问题:

在 faq 搜索时不时会遇到数据库错误,描述如下:

数据库错误出现于 vBulletin 3.0.1:
 
Invalid SQL:
                SELECT faqname, faqparent, phrase.text AS title
                FROM faq AS faq
                INNER JOIN phrase AS phrase ON(phrase.phrasetypeid = 7000 AND ph
rase.varname = faq.faqname)
                WHERE phrase.languageid IN(-1, 0, 1)
                        AND (
                        faqparent IN('vb_custom_status', 'vb_update_profile', 'v
b_calendar_how', 'vb_referrals_explain', 'vb_sig_explain', 'vb_user_maintain')
                        OR
                        faqname IN('vb_custom_status', 'vb_update_profile', 'vb_
calendar_how', 'vb_referrals_explain', 'vb_sig_explain', 'vb_user_maintain')
                )
 
mysql 错误: Illegal mix of collations (latin1_bin,IMPLICIT) and (latin1_swedish_
ci,IMPLICIT) for operation '='
 
mysql 错误号: 1267
 
日期: Thursday 06th of January 2005 11:43:59 AM
脚本: http://club.zsnet.com/faq.php?s=&do=search&q=%B8%F6%C8%CB%D7%CA%C1%CF&matc
h=all&titlesonly=0
涉及:
用户名: 未注册
IP 地址:


经过 google 搜索,在VBB官方论坛上发现的解决办法:
登录MYSQL后执行这个语句就可以了:
ALTER TABLE `phrase` CHANGE `varname` `varname` VARCHAR( 250 ) NOT NULL;


据说是 MYSQL 的字符 charset 的问题。具体都不甚了解。





本文地址:http://com.8s8s.com/it/it23820.htm