Friday 2 November 2018

php - No connection could be made because the target machine actively refused it. wordpress


Warning: mysql_connect() [function.mysql-connect]: [2002] No connection could be made because the target machine actively (trying to connect via tcp://localhost:3306) in D:\Hosting\8224951\html\word\wp-includes\wp-db.php on line 1141



Warning: mysql_connect() [function.mysql-connect]: No connection could be made because the target machine actively refused it. in D:\Hosting\8224951\html\word\wp-includes\wp-db.php on line 1141





I always get this error while trying to connect to my wordpress website.
I've searched everywhere and can't seem to find a solution.



here's my wp_db file contains on like 1141.



    if ( WP_DEBUG ) {
$this->dbh = mysql_connect(':/Applications/MAMP/tmp/mysql/mysql.sock', 'ShiftBusinessSol', '123456!');
} else {
$this->dbh = mysql_connect(':/Applications/MAMP/tmp/mysql/mysql.sock', 'ShiftBusinessSol', '123456!');

}


as for config i have this:



 /** The name of the database for WordPress */
define('DB_NAME', 'ShiftBusinessSol');
/** MySQL database username */
define('DB_USER', 'ShiftBusinessSol');
/** MySQL database password */

define('DB_PASSWORD', '123456!');
/** MySQL hostname */
define('DB_HOST', '127.0.0.1:3306');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...