Home >Database >Mysql Tutorial >解决 phpmyadmin #2002 无法登录 MySQL 服务器_MySQL

解决 phpmyadmin #2002 无法登录 MySQL 服务器_MySQL

WBOY
WBOYOriginal
2016-06-01 13:22:451033browse

phpmyadmin

bitsCN.com 解决 .#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

搞定bitsCN.com
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