swoft-cloud / swoft

🚀 PHP Microservice Full Coroutine Framework
https://swoft.org
Apache License 2.0
5.58k stars 786 forks source link

mysql密码配置出错的时候,返回错误显示容易让人误解 #369

Closed CodeMonkeyLuffy closed 6 years ago

CodeMonkeyLuffy commented 6 years ago
Q A
Bug report? yes
Feature request? no
Swoft version 1.0.7
Swoole version 2.2.0
PHP version 7.1
Runtime environment Win10/Mac/CentOS 7/Ubuntu/Docker etc.

Details

数据库密码配置错误 但是swoft打印的信息容易让人误解  数据库ip不是配置的 第一反应谁让人觉得是数据库ip配置错了

SQLSTATE[HY000] [1045] Access denied for user 'ceshi'@'120.199.31.162' (using password: YES)

swoft 截取客户端请求IP

image

huangzhhui commented 6 years ago

这是标准的MySQL错误返回信息