【问题标题】:db4free.net error: "Connection failed: Server sent charset unknown to the client"db4free.net 错误:“连接失败:服务器向客户端发送未知字符集”
【发布时间】:2018-11-30 13:06:40
【问题描述】:

我正在 heroku.com 上编写一个 Telegram 机器人,链接到 Dropbox。

我正在尝试使用 php 连接到位于 db4free.net 的数据库。这些是数据库的规格:

Database server

Server: MySQL 8.0 Server (127.0.0.1 via TCP/IP)
Server type: MySQL
Server connection: SSL is used without certification authority      
Server version: 8.0.11 - MySQL Community Server - GPL
Protocol version: 10
User: trial4life@localhost
Server charset: UTF-8 Unicode (utf8)

Web server

Apache/2.4.18 (Ubuntu)
Database client version: libmysql - mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $
PHP extension: mysqliDocumentation curlDocumentation mbstringDocumentation
PHP version: 7.0.30-0ubuntu0.16.04.1

每当我尝试连接到数据库时(记住 php 脚本是从 heroku.com 启动的),我都会收到以下错误:

Connection failed: Server sent charset unknown to the client. Please, report to the developers.

我读到我可以尝试编辑 my.cnf 文件以适应 utf 编码,但数据库由 db4free.net 托管,所以我认为我无法以这种方式修复。

我该如何解决?

【问题讨论】:

    标签: php mysql database bots telegram


    【解决方案1】:

    我遇到了同样的问题(在 Windows 上)。我将我的 PHP 版本升级到 7.2.7,问题就消失了。

    https://github.com/laradock/laradock/issues/1130

    【讨论】:

      猜你喜欢
      • 2020-11-08
      • 1970-01-01
      • 1970-01-01
      • 2014-01-25
      • 2017-06-25
      • 2015-05-10
      • 1970-01-01
      • 2019-03-30
      • 2019-04-25
      相关资源
      最近更新 更多