mysql> SELECT LOCATE("n", "München") COLLATE utf8_general_ci;
ERROR 1253 (42000): COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'binary'
मैं इस त्रुटि से कैसे छुटकारा पा सकता हूं?COLLATION 'utf8_general_ci' वर्णक सेट 'बाइनरी' के लिए मान्य नहीं है?
क्या मैं पहले से ही करने की कोशिश की (कॉपी & पेस्ट):
$ mysql -u admin -p $DATABASE
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.69 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SELECT LOCATE("n", "München") COLLATE utf8_general_ci;
ERROR 1253 (42000): COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'binary'
mysql> SET NAMES utf8;
Query OK, 0 rows affected (0.00 sec)
mysql> SELECT LOCATE("n", "München") COLLATE utf8_general_ci;
ERROR 1253 (42000): COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'binary'
mysql> SELECT LOCATE(_utf8"n", _utf8"München") COLLATE utf8_general_ci;
ERROR 1253 (42000): COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'binary'
mysql> SHOW VARIABLES LIKE "character_set_database";
+------------------------+-------+
| Variable_name | Value |
+------------------------+-------+
| character_set_database | utf8 |
+------------------------+-------+
1 row in set (0.00 sec)
कौन सी तालिका? मेरी क्वेरी एक तालिका का संदर्भ नहीं देती है। – feklee
क्षमा करें, यहां आधा सो जाओ। मैंने जवाब पूरी तरह से बदल दिया है। – Bobulous
प्रश्न पूछने से पहले, मैंने 'सेट नाम utf8'' की कोशिश की, और अब सफलता के बिना। * परिचयकर्ता * एक अच्छा समाधान की तरह दिखते हैं, लेकिन वे काम नहीं करते: त्रुटि संदेश बनी रहती है। मैंने कोशिश की: 'चयन करें (_utf8 "n", _utf8 "म्यूनचेन") COLLATE utf8_general_ci' वैसे, मैं सीधे खेलने के लिए कंसोल का उपयोग कर रहा हूं। मैंने कंसोल शुरू किया: 'mysql -u admin -p $ डेटाबेस' मैं बस 'character_set_database "जैसे चर दिखाता हूं।परिणाम: 'utf8' – feklee