我以前使用phpmyadmin都是很正常的,从来没有出现过问题。但是今天出现了提示#2002无法登陆到MYSQL服务器
解决 .#2002 无法登录 MySQL 服务器
将config.sample.inc.php复制成config.inc.php
出现这个错误,表示没有连接到数据库。修改config.inc.php文件,
代码如下:
将$cfg['Servers'][$i]['host'] = 'localhost';
改为$cfg['Servers'][$i]['host'] = '127.0.0.1';
或者
修改 php.ini : mysql.default_socket = /tmp/mysql.sock
搞定
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn