错误“客户端不支持源字符集"当字段设置为 uft8mb4_general_ci

Error quot;Source character set not supported by clientquot; when field set to uft8mb4_general_ci(错误“客户端不支持源字符集当字段设置为 uft8mb4_general_ci)
本文介绍了错误“客户端不支持源字符集"当字段设置为 uft8mb4_general_ci的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此错误是 Windows MariaDB 驱动程序问题吗?

Is this error a Windows MariaDB driver issue?

[MySQL][ODBC 5.1 Driver][mysqld-5.5.5-10.2.12-MariaDB]客户端不支持源字符集

[MySQL][ODBC 5.1 Driver][mysqld-5.5.5-10.2.12-MariaDB]Source character set not supported by client

尝试使用此 asp 代码进行连接时,我不断收到错误消息:

I keep getting the error when trying to connect using this asp code:

Set rs = Server.CreateObject("ADODB.Recordset")
rs.ActiveConnection = Connection_STRING
rs.Source = "SELECT * FROM mytable WHERE text-str = 'some text'
rs.CursorType = 1
rs.CursorLocation = 2
rs.LockType = 1
rs.Open()
if (rsL.EOF) then
    ...
end if
rs.Close()
Set rs = Nothing

推荐答案

只是将text-str数据类型从VARCHAR改为TEXT 事情开始奏效了.

It was only after changing text-str datatype form VARCHAR to TEXT that things started to work.

但一段时间后,我发现我无法从表格中获取任何文本.我可以保存到它,但不能取回它.

But some time later I found that I couldn't get any text from the table. I could save to it, but not get it back.

经过一番搜索,我终于能够通过将字段的默认排序规则从 uft8mb4_general_ci 更改为 uft8_general_ci 来解决错误.现在 VARCHAR 也可以使用了.

After some more searching, I was finally able to resolve the error by changing the field's default collation from uft8mb4_general_ci to uft8_general_ci. And now VARCHAR also works.

我在更新/删除 Wordpress 插件后开始的错误.不知何故,这改变了数据库的一些默认设置,我连接到它的方式不再起作用.

The error I started after a Wordpress plugin update/removal. Somehow this changed some default settings to the database, and the way I was connecting to it was not working any more.

安装更新的 ODBC 驱动程序解决了它.

Installing an updated ODBC driver solved it.

这篇关于错误“客户端不支持源字符集"当字段设置为 uft8mb4_general_ci的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Hibernate reactive No Vert.x context active in aws rds(AWS RDS中的休眠反应性非Vert.x上下文处于活动状态)
Bulk insert with mysql2 and NodeJs throws 500(使用mysql2和NodeJS的大容量插入抛出500)
Flask + PyMySQL giving error no attribute #39;settimeout#39;(FlASK+PyMySQL给出错误,没有属性#39;setTimeout#39;)
auto_increment column for a group of rows?(一组行的AUTO_INCREMENT列?)
Sort by ID DESC(按ID代码排序)
SQL/MySQL: split a quantity value into multiple rows by date(SQL/MySQL:按日期将数量值拆分为多行)