php 7.2 mysql 8.0 配置备忘

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/liu709127859/article/details/82718289

闲着没事,倒腾了一下最新版本的 环境搭配 iis php mysql wordpress

Warning: mysqli::__construct(): Unexpected server respose while doing caching_sha2 auth: 109 in E:\phpenviroment\myweb\index.php on line 7

Warning: mysqli::__construct(): MySQL server has gone away in E:\phpenviroment\myweb\index.php on line 7

Warning: mysqli::__construct(): (HY000/2006): MySQL server has gone away in E:\phpenviroment\myweb\index.php on line 7
连接失败: MySQL server has gone away

出现这个问题

[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8
 
[mysqld]
# 设置3306端口
port = 3306
# 设置mysql的安装目录
basedir=E:\phpenviroment\mysql
# 设置mysql数据库的数据的存放目录
datadir=E:\phpenviroment\mysql\data
# 允许最大连接数
max_connections=20
# 服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB

default_authentication_plugin=mysql_native_password

character_set_server =utf8

php 中 mysqli找不到这个方法

php ext文件夹中有这个dll后,去配置中开启这个扩展就行

extension=php_mysqli.dll

猜你喜欢

转载自blog.csdn.net/liu709127859/article/details/82718289