Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.7k views
in Technique[技术] by (71.8m points)

php - SQLSTATE[HY000] [2054] Server sent charset unknown to the client. Please, report to the developers

I am trying to create a login system in laravel. I've updated env. file with a database called kokodb. However, when I run this code 'php artisan migrate' in cmd, I came up with the following error:

In Connection.php line 647:

SQLSTATE[HY000] [2054] Server sent charset unknown to t he client. Please, report to the developers (SQL: selec t * from information_schema.tables where table_schema = kokodb and table_name = migrations)

In Connector.php line 68:

SQLSTATE[HY000] [2054] Server sent charset unknown to t he client. Please, report to the developers

In Connector.php line 68:

PDO::__construct(): Server sent charset (255) unknown t o the client. Please, report to the developers

Can you please help me. I did not find any solution to this problem anywhere else.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

What version of PHP are you using?

According to PHP's bugtracker, this should be fixed as of 7.0.19, 7.1.5, and 7.2.0.

https://bugs.php.net/bug.php?id=74461

Arun's links mention a solution of changing the server charset back to utf8, but utf8mb4 really is preferable because it offers full unicode support.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...