Online Purchases

Wednesday, February 10, 2021

The server requested authentication method unknown to the client

 Mysql Version : 8.0.23

PHP version : 5.6.40

CentOS Linux release 7.9.2009 (Core)

Take a backup of /etc/my.cnf

[mysqld]

default_authentication_plugin= mysql_native_password

Restart Mysql service

systemctl restart mysqld

Login to Mysql root prompt

alter user 'user'@'localhost' identified with mysql_native_password by 'your_password';

After this, if you get an error "If it is FULL_GROUP_GROUP_BY exist, then we need to disable it:"

SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

Failed to connect to MySQL: Server sent charset unknown to the client. Please, report to the developers

 Mysql Version : 8.0.23

PHP version : 5.6.40

CentOS Linux release 7.9.2009 (Core)


Take a backup of /etc/my.cnf

[mysqld]
character-set-server=utf8

Restart Mysql service

systemctl restart mysqld