admin avatar

mysql database connection failed | SQLSTATE[HY000] [2002] Connection refused solution

🕞 by admin





mysql database connection failed | SQLSTATE[HY000] [2002] Connection refused solution

The address bound to the mysql database does not match the address entered

For example, you are bound to localhost in mysql, but the configuration database is written as 127.0.0.1

Or mysql is bound to 127.0.0.1, and the database configuration is localhost

For the listening address of the mysql database, check the my.cnf configuration file.

This will result in database connection failure | SQLSTATE[HY000] [2002] Connection refused





💘 相关文章

写一条评论

Based on Golang + fastHTTP + sdb | go1.18.3 Processed in 1ms