Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我希望以下字符»在我进行查询时显示,但我不断收到以下字符»
这是我的查询:
SELECT CONCAT_WS(' » ',t2.`description`,t1.`description`) AS pages_structure
我的数据库设置为 utf8_general_ci
我的猜测是您的客户端字符集不是 utf8。运行此程序以了解是否是这种情况:
show variables like 'character_set_client';
然后你可以像这样改变它来测试它是否能解决你的问题:
set character_set_client = 'utf8';
您可能还需要在 /etc/my.cnf 中进行更改。
通过更新到 MySQL 5.5 版设法解决了这个问题。