PDA

View Full Version : Database error - Illegal mix of collations


27RUS
03-25-2012, 10:46 AM
http://forum.adsbradar.ru/f27/foto-s-neba-il-22-a-197/

what i'll must do??

i have

Invalid SQL:
SELECT * FROM xxx_seoqueries_terms WHERE term_value='СЃР?РјРѕР?ёт Р Р›-18. Р?ото РІРЅР?шний РІРёРґ.';

MySQL Error : Illegal mix of collations (utf8_general_ci,IMPLICIT) and (cp1251_general_ci,COERCIBLE) for operation '='
Error Number : 1267
Request Date : Sunday, March 25th 2012 @ 03:44:29 PM
Error Date : Sunday, March 25th 2012 @ 03:44:29 PM
Script : http://forum.adsbradar.ru/f27/foto-s-neba-il-22-a-197/
Referrer : http://www.google.ru/url?sa=t&rct=j&q=%D1%81%D0%B0%D0%BC%D0%BE%D0%BB%D1%91%D1%82+%D0%9 8%D0%9B-18.+%D0%A4%D0%BE%D1%82%D0%BE,+%D0%B2%D0%BD%D0%B5%D 1%88%D0%BD%D0%B8%D0%B9+%D0%B2%D0%B8%D0%B4.&source=web&cd=15&ved=0CEAQFjAEOAo&url=http%3A%2F%2Fforum.adsbradar.ru%2Fshowthread.p hp%3Ft%3D197&ei=XCFuT_fMFcf68QO87am_DQ&usg=AFQjCNGsHNFwNwKWvfq1Z42sW38uTkSJPA&cad=rjt
IP Address : 95.70.50.73
Username : IC7K
Classname : vB_Database
MySQL Version : 5.5.15-log

Lynne
03-25-2012, 05:18 PM
When vBulletin creates a new table in the upgrade process, it asks MySQL what the default collation for the database is and then uses that. Most MySQL installations default to latin1_swedish_ci. If you have changed collations for any reason on tables in the past then you should change the database to use that as the default to prevent this issue from happening in the future.

You will find more information in the MySQL manual here:
http://dev.mysql.com/doc/refman/5.1/en/charset.html

You will need to use phpMyAdmin and make sure that all tables and fields within them have the same collation. Make sure your database collations are appropriate and consistent throughout the entire database. You need to use program like phpmyadmin to view your collations:

http://www.phpmyadmin.net/home_page/index.php

When you click your database name in phpmyadmin it will list all tables, their collations, as well as the collation of the database itself at the bottom. And when you click the name of a table on the left it will list the collations of individual fields within that table.

1) To edit the collation of the database itself you need to click the database name on the left and then click "Operations" on the top.

2) To edit the collation of an individual table you need to click its name on the left and then click "Operations" on the top.

3) To edit the collation of an individual field within a table you need to click the table name on the left and then click the edit image (a little pencil icon) for that field.

For more information please see: http2://www.vbulletin.com/forum/showthread.php?t=275958&highlight=collation

Note: It is very very very important to make full database backups before proceeding if you are ever manually making any changes to your database, let it be issuing queries, or editing it via phpMyAdmin or any other interface. If done incorrectly, manually modifying the database can potentially cause irreversible damage to your database, and there is no way to perform a "partial restore" to restore just the part you may break.