Deal with Warning: mysqli::__construct(): (HY000/2002)

时间:2021-09-08 14:13:56

1、安装XAMPP之后,如果之前安装过MySQL或者 apache,启动XAMPP中的响应的服务的时候回出现报错,

Deal with Warning: mysqli::__construct(): (HY000/2002)

出错的原因,具体看报错的原因,如果是端口占用,在配置中修改端口号,如果是提示 “Found Path: D:\mysql-8.0.13-winx64\bin\mysqld MySQL” 说明之前安装的MySQL在注册表中没有更新过来,需要到注册表中修改。复制XAMPP中MySQL的位置 覆盖原先注册表中的路径,我的是默认的路径 C:\xampp\mysql\bin

Deal with Warning: mysqli::__construct(): (HY000/2002)

修改ImagePath中的路径位置,,,注册表修改的路径HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\MySQL

Deal with Warning: mysqli::__construct(): (HY000/2002)

修改之后重新启动XAMPP中的MySQL服务

Deal with Warning: mysqli::__construct(): (HY000/2002)

打开网页提示还存在两个警告,需要修改数据库的默认账户密码

Deal with Warning: mysqli::__construct(): (HY000/2002)

Deal with Warning: mysqli::__construct(): (HY000/2002)Deal with Warning: mysqli::__construct(): (HY000/2002)