thinkphp sets DB_CHARSET to utf8mb4

不言
Release: 2023-03-01 08:44:01
Original
4509 people have browsed it


tp3.2.3 database configuration 'DB_CHARSET'=> 'utf8mb4', execution error. As follows

SQLSTATE[HY000] [2019] Can't initialize character set utf8mb4 (path: /usr/share/mysql/charsets/)
错误位置

FILE: /data1/www/htdocs/733/ecampus/3/ThinkPHP/Library/Think/Db/Driver.class.php  LINE: 109
Copy after login
Copy after login

If you don’t use tp, you can use the native sql ‘set names utf8mb4’ and there will be no problem.
What went wrong? Please fix it! Thank you!

Reply content:

tp3.2.3 database configuration 'DB_CHARSET'=> 'utf8mb4', execution error. As follows

SQLSTATE[HY000] [2019] Can't initialize character set utf8mb4 (path: /usr/share/mysql/charsets/)
错误位置

FILE: /data1/www/htdocs/733/ecampus/3/ThinkPHP/Library/Think/Db/Driver.class.php  LINE: 109
Copy after login
Copy after login

If you don’t use tp, you can use the native sql ‘set names utf8mb4’ and there will be no problem.
What went wrong? Please fix it! Thank you!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template