Home > Database > Mysql Tutorial > body text

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

WBOY
Release: 2016-06-07 18:07:01
Original
1045 people have browsed it

我以前使用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

搞定
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!