Knowledge Base

SQL ERROR: Connection refused CODE: 2002

Article ID: 474
Last updated: 15 Mar, 2021

Error message/code:

Database error!
SQL ERROR: Connection refused
CODE: 2002

Description:

The MySQL error (2002) Can't connect to ... normally means that there is no MySQL server running on the system or that you are using an incorrect Unix socket file name or TCP/IP port number when trying to connect to the server. You should also check that the TCP/IP port you are using has not been blocked by a firewall or port blocking service.

Solution:

In file /kbp_dir/admin/config.inc.php

change
$conf['db_host']      = "localhost";

to
$conf['db_host']      = “127.0.0.1"

Article ID: 474
Last updated: 15 Mar, 2021
Revision: 1
Access: Public
Views: 451
Comments: 0