我的Windows 10机器上的WAMP 2.5服务器工作正常,直到我不小心安装了在同一台机器上默默安装WinMySqlAdmin的软件。
那天起,Wamp服务器图标保持橙色(从不变为绿色)。
问题:
欢迎使用phpMyAdmin
错误
MySQL说:#2002 - 无法建立连接,因为目标计算机主动拒绝它。
服务器没有响应(或者本地服务器的套接字没有响应 正确配置)。
虽然其他服务似乎正在运行,但MySQL服务却没有。
我在c:\ wamp \ www文件夹下添加了一个名为testmysql.php的文件。该文件的内容如下:
<?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);
?>
从http://localhost/testmysql.php执行testmysql.php,出现以下错误:
警告:mysqli_connect():( HY000 / 2002):无法建立连接,因为目标计算机主动拒绝它。在 第2行的C:\ wamp \ www \ testmysql.php
以下是我的PHP错误日志:
[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:\wamp\www\mysql_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:\wamp\www\mysql_test.php:0
[22-Nov-2015 08:59:47 Europe/Paris] PHP 2. mysql_connect() C:\wamp\www\mysql_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:\wamp\www\mysql_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:\wamp\www\mysql_test.php:0
[22-Nov-2015 08:59:49 Europe/Paris] PHP 2. mysql_connect() C:\wamp\www\mysql_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:\wamp\www\testmysql.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:\wamp\www\testmysql.php:0
[22-Nov-2015 10:18:20 Europe/Paris] PHP 2. mysql_connect() C:\wamp\www\testmysql.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:\wamp\www\testmysql.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:\wamp\www\testmysql.php:0
[22-Nov-2015 10:18:23 Europe/Paris] PHP 2. mysql_connect() C:\wamp\www\testmysql.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:\wamp\www\testmysql.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:\wamp\www\testmysql.php:0
[22-Nov-2015 10:18:23 Europe/Paris] PHP 2. mysql_connect() C:\wamp\www\testmysql.php:2
经过大量的谷歌搜索后,我尝试了以下内容:
这
socket = /tmp/mysql.sock
到
socket = c:/tmp/mysql.sock
从wamp \ bin \ mysql \ mysql5.6.17 \ data中删除了所有文件(不是文件夹)。
卸载WAMP并重新安装。
从WAPM控制面板中删除了MySQL服务并重新安装。
取消评论my.ini文件中的'skip-networking'一行。
Skype没有在端口80上运行,但为了更安全一方已退出Skype,因此它没有在我的机器上运行。
即使执行了以上所有操作,问题仍然存在。
我现在已将所有更改撤回到默认状态(问题仍然存在),有人可以告诉我这是什么问题吗?以及如何解决它?