WAMP 2.5 server on my windows 10 machine was working completely fine, until I accidentally installed a software which silently installed Win MySQLAdmin on the same machine.
That day since, Wamp server icon remains in orange color (never turns green).

Issues:

  1. localhot/ phpmyadmin displays 'access denied' error. following is the exact test:

Welcome to phpMyAdmin
Error
MySQL said: #2002 - No connection could be made because the target machine actively refused it.
The server is not responding (or the local server's socket is not correctly configured).

  1. MySQL service:

While the other services seem to be running, MySQL service isn't.

I had added a file called testmysql.php under c:wampwww folder. Content of the file are as follows:

<?php 
$link = mysql_connect("localhost","root",""); 
#I haven't created a DB thus, have not mentioned DB name in the above line
if (!$link) { 
    die('Could not connect to MySQL: ' . mysql_error()); 
} 
echo 'Connection OK'; mysql_close($link); 
?> 

executing testmysql.php from http://localhost/testmysql.php , gives the following error:

Warning: mysqli_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. in
C:wampwwwtestmysql.php on line 2

  1. MySQL log from under WAPM control panel is blank.

After a lot of google search, I have tried the following:

  1. Changed the line in my.ini file

from

socket = /tmp/mysql.sock

to

socket = c:/tmp/mysql.sock
  1. deleted all the files (not folders) from wampbinmysqlmysql5.6.17data .

  2. Uninstalled WAMP and reinstalled it.

  3. Removed MySQL service from WAPM control panel and reinstalled it.

  4. un-commented the line 'skip-networking' from my.ini file.

  5. Skype is not running on port 80, though to be on a safer side have quit skype, and thus it isn't running on my machine.

Even after performing all the above, the issue still persists. <br/>

I have now revoked all the changes back to default (issue still persists), can someone please let me know what the issue is? and how to resolve it?

Following is my PHP error log:

        [22-Nov-2015 07:00:22 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:00:22 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:00:22 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:00:23 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:02:00 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:02:00 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:02:00 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:02:00 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:12:52 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:12:52 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:12:53 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:12:53 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:14:38 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:14:38 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:14:39 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:14:39 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:44:26 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:44:26 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:44:27 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:44:27 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:45:55 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:45:55 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:45:56 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:45:56 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:49:12 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:49:12 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:49:12 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:49:12 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:54:19 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:54:19 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:54:20 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 07:54:20 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 08:59:47 Europe/Paris] PHP Deprecated:  mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:wampwwwmysql_test.php on line 4

        [22-Nov-2015 08:59:47 Europe/Paris] PHP Stack trace:

        [22-Nov-2015 08:59:47 Europe/Paris] PHP   1. {main}() C:wampwwwmysql_test.php:0

        [22-Nov-2015 08:59:47 Europe/Paris] PHP   2. mysql_connect() C:wampwwwmysql_test.php:4

        [22-Nov-2015 08:59:49 Europe/Paris] PHP Warning:  mysql_connect(): No connection could be made because the target machine actively refused it.

         in C:wampwwwmysql_test.php on line 4

        [22-Nov-2015 08:59:49 Europe/Paris] PHP Stack trace:

        [22-Nov-2015 08:59:49 Europe/Paris] PHP   1. {main}() C:wampwwwmysql_test.php:0

        [22-Nov-2015 08:59:49 Europe/Paris] PHP   2. mysql_connect() C:wampwwwmysql_test.php:4

        [22-Nov-2015 09:10:39 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 09:10:39 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 09:10:40 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 09:10:40 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

         in Unknown on line 0

        [22-Nov-2015 10:18:20 Europe/Paris] PHP Deprecated:  mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:wampwwwtestmysql.php on line 2

        [22-Nov-2015 10:18:20 Europe/Paris] PHP Stack trace:

        [22-Nov-2015 10:18:20 Europe/Paris] PHP   1. {main}() C:wampwwwtestmysql.php:0

        [22-Nov-2015 10:18:20 Europe/Paris] PHP   2. mysql_connect() C:wampwwwtestmysql.php:2

        [22-Nov-2015 10:18:23 Europe/Paris] PHP Warning:  mysql_connect(): php_network_getaddresses: getaddrinfo failed: No such host is known.  in C:wampwwwtestmysql.php on line 2

        [22-Nov-2015 10:18:23 Europe/Paris] PHP Stack trace:

        [22-Nov-2015 10:18:23 Europe/Paris] PHP   1. {main}() C:wampwwwtestmysql.php:0

        [22-Nov-2015 10:18:23 Europe/Paris] PHP   2. mysql_connect() C:wampwwwtestmysql.php:2

        [22-Nov-2015 10:18:23 Europe/Paris] PHP Warning:  mysql_connect(): php_network_getaddresses: getaddrinfo failed: No such host is known.  in C:wampwwwtestmysql.php on line 2

        [22-Nov-2015 10:18:23 Europe/Paris] PHP Stack trace:

        [22-Nov-2015 10:18:23 Europe/Paris] PHP   1. {main}() C:wampwwwtestmysql.php:0

        [22-Nov-2015 10:18:23 Europe/Paris] PHP   2. mysql_connect() C:wampwwwtestmysql.php:2

Hi,

can you access MySQL from command line client? By running below you should be able to access it:

mysql -uroot

And if affirmative can you run queries in database? In some cases, due to different installation sources, some libraries are overwritten and the server fails to return data, you can connect through the client, so it seems working, but tend to fail when you run a query. In cases like this you have to restore all the changed libraries and then it should work fine.

By the way, are you sure the socket file exists in c:/tmp/mysql.sock path?

And have you tried the above example connection with MySQLi or PDO? For example:

<?php

$servername = "localhost";
$dbname     = "mysql";
$dbusername = "root";
$dbpassword = "";

try {

    $conn = new PDO("mysql:host=$servername;dbname=$dbname", $dbusername, $dbpassword);
    $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    return $conn;
}

catch(Exception $e) {

    die('Connection failed: ' . $e->getMessage());

}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.