Can't connect to MySQL server on 'localhost' (10061)的解决办法!
第一步:将php_mysql.dlllibmysql.dll文件拷贝至c:\windows\system32;
第二步:按照以下内容配置
1, php.ini Review:
1. extension_dir = "C: \ PHP \ ext";
2. extension = php_dba.dll;
3. extension = php_dbase.dll;
4. extension = php_gd2.dll;
5. extension = php_imap.dll;
6. extension = php_mysql.dll;
7. extension = php_pdo.dll;
8. extension = php_pdo_mysql.dll;
9. mysql.allow_persistent = On;
10. mysql.default_port = 3306;
11. mysql.default_host = localhost;
12. mysql.default_user = root;
13. mysql.default_password = marc; / / marc is my mysql login password.
2 php.ini-recommended modifications:
1. doc_root = "D: \ phpproject"
2. extension_dir = "C: \ PHP \ ext";
3. mysql.allow_persistent = On;
4. mysql.default_port = 3306;
5. mysql.default_host = localhost;
6. mysql.default_user = root;
3, f modifications:
1. DocumentRoot "D: / phpproject";
2. <Directory "D:/phpproject">;
3. mysql下载出现installerDirectoryIndex index.htm; / / Home
4 Last face:
1. # BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
2. PHPIniDir "C: / PHP /"
3. LoadModule php5_module "C: / PHP/php5apache2_2.dll"
4. # Add by marc
5. AddType application / x-httpd-php. Php
6. # END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
安装目录试情况而定
第三步:
my.ini[mysqld]部分中加一行bind-address = 127.0.0.1
PSMySQL这里使用了bind-address后,phpMyAdminconfig.inc.phphost最后也改成127.0.0.1,否则可能连不上MySQL

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。