【发布时间】: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