louislivi / SMProxy

Swoole MySQL Proxy 一个基于 MySQL 协议,Swoole 开发的MySQL数据库连接池。 A MySQL database connection pool based on MySQL protocol and Swoole.

Home Page:https://smproxy.louislivi.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

当数据库密码为空时,无法连接数据库

zhenzhenwu opened this issue · comments

Describe Your Environment (描述你的环境)

  • System: centos7
  • PHP version: 7.2.8
  • Mysql version: 5.6.42
  • Swoole version: 4.4.2
  • SMProxy version: 1.2.9

How to Reproduce the Problem? (如何重现问题)

数据库密码为空字符串时
"account": { "root_test": { "user": "root_test", "password": "" } },

Expected Behavior (预期行为)

使用PDO原生可以正常连接mysql,使用SMProxy无法连接

Actual Behavior (实际行为)

SMProxy@Connection xxxxxx waiting timeout, 无法连接数据库,根据打印得知
Rÿ#28000Access denied for user 'xxxx'@'xxxxxx' (using password: YES)

More Information (更多信息)

...

是的,存在这个问题 设置个密码就好了