We're trying to connect MySQL v8.0 from php 5.4, using AdoDB (V5.05 11 July 2008). Upon connecting, we're getting the following error:
Server sent charset unknown to the client. Please, report to the developers
The above setup is required because we already have an existing MySQL DB running on v5.6, which will soon be deprecated by the AWS. So, we need to migrate our project to this newer version of MySQL. The existing MySQL (v5.6) has the following charsets... enter image description here
So far we've tested the following things:
Tried changing the default charset in MySQL v.8.0 to utf8 in my.cnf file. But that file again includes the following files:
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
We then tried to make changes in the file mysql.cnf in /etc/mysql/mysql.conf.d/ directory.
[client]
default-character-set=utf8
[mysql]
character-sets-dir=/usr/share/mysql-8.0/charsets default-character-set=utf8
- In mysqld.cnf in /etc/mysql/mysql.conf.d/, we added the following lines:
[mysqld]
character-set-server=utf8
character-sets-dir=/usr/share/mysql-8.0/charsets
default-character-set=utf8
After the following services, when we restarted the MySQL services we got the following errors:
unknown variable 'default-character-set=utf8'
Warning: --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
- From application's side:
Got packets out of order
P.S: Currently using Ubuntu 20.04