phpMyAdmin的#2054无法登录到MySQL服务器 [英] phpmyadmin #2054 cannot log in to the mysql server

查看:13029
本文介绍了phpMyAdmin的#2054无法登录到MySQL服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在MySQL和Apache的,PHP和phpMyAdmin的一个新手。我建造的第一台服务器是在Windows Vista x32bit,它是成功的。然后,我尝试建立在另一台笔记本电脑的第二台服务器,它是Windows 7的x64bit并stucked错误code#2054。我使用'localhost'的一个固定的IP地址。从我的.msi文件单独安装在服务器上,而不是一个包安装。

输入我的'根',我的'密码'后,我然后单击开始,就弹出两个错误信息,一个是#2054无法登录到MySQL服务器,另一个是用于控制用户连接在配置失败定义。

我搜查了许多资源网上,但出于运气。

我该如何解决这两个错误?

在帮助的任何信息。先谢谢了。

下面是我的config.inc.php:

 在这里与输入code LT; PHP
/ * VIM:设置expandtab SW = 4 TS = 4 STS = 4:* /
/ **
 * phpMyAdmin的示例配置,你可以使用它作为基地
 *手动配置。为了方便安装,您可以使用安装/
 *
 *所有指令都在documentation.html上和phpMyAdmin的解释
 *维基< HTTP://wiki.phpmyadmin.net> ;.
 *
 * @package phpMyAdmin的
 * / / *
  *这是需要基于cookie的身份验证的加密密码
  * 曲奇饼
  * /
 $ CFG ['blowfish_secret'] ='a8b7c6d'; / *您必须填写在本作COOKIE A​​UTH! * / / *
  *服务器配置
  * /
 $ I = 0; / *
  *第一服务器
  * /
 $ I ++;
/ *认证类型* /
$ CFG桩[服务器] [$ i] ['AUTH_TYPE'] ='饼干';
/ *服务器参数* /
$ CFG桩[服务器] [$ i] ['主机'] ='localhost'的;
$ CFG桩[服务器] [$ i] ['connect_type'] ='TCP';
$ CFG桩[服务器] [$ i] ['COM preSS'] = FALSE;
/ *选择的MySQL如果您的服务器不具备的mysqli * /
$ CFG桩[服务器] [$ i] ['扩展'] ='mysqli的;
$ CFG桩[服务器] [$ i] ['AllowNoPassword'] = FALSE;/ *
 * phpMyAdmin的配置存储设置。
 * // *用户使用,存储操作* /
// $ CFG桩[服务器] [$ i] ['controlhost'] ='';
$ CFG桩[服务器] [$ i] ['控制用户'] ='phpMyAdmin的';
$ CFG桩[服务器] [$ i] ['controlpass'] ='johan1234';/ *存储数据库和表* /
$ CFG桩[服务器] [$ i] ['pmadb'] ='phpMyAdmin的';
$ CFG桩[服务器] [$ i] ['bookmarktable'] ='pma_bookmark';
$ CFG桩[服务器] [$ i] ['关系'] ='pma_relation';
$ CFG桩[服务器] [$ i] ['table_info'] ='pma_table_info';
$ CFG桩[服务器] [$ i] ['table_coords'] ='pma_table_coords';
$ CFG桩[服务器] [$ i] ['pdf_pages'] ='pma_pdf_pages';
$ CFG桩[服务器] [$ i] ['column_info'] ='pma_column_info';
$ CFG桩[服务器] [$ i] ['历史'] ='pma_history';
$ CFG桩[服务器] [$ i] ['table_ui preFS'] ='pma_table_ui preFS';
$ CFG桩[服务器] [$ i] ['跟踪'] ='pma_tracking';
$ CFG桩[服务器] [$ i] ['designer_coords'] ='pma_designer_coords';
$ CFG桩[服务器] [$ i] ['UserConfig的'] ='pma_userconfig';
$ CFG桩[服务器] [$ i] ['最近'] ='pma_recent';
/ *的Contrib / Swekey验证* /
// $ CFG桩[服务器] [$ i] ['auth_swekey_config'] ='/etc/swekey-pma.conf';/ *
 *服务器配置结束
 * // *
 *目录从服务器保存/载入文件
 * /
$ CFG ['UploadDir'] ='';
$ CFG ['SaveDir可以'] ='';/ **
 *定义用户是否应显示显示所有(记录)
 *按钮,在浏览模式或没有。
 *默认值= FALSE
 * /
// $ CFG ['勾住ShowAll'] =真;/ **
 *浏览一个结果集时显示的行数。如果结果
 *集包含更多行,previous和下一步。
 *默认值= 30
 * /
// $ CFG ['MAXROWS'] = 50;/ **
 *使用图形不太激烈菜单选项卡
 *默认值= FALSE
 * /
// $ CFG ['LightTabs'] =真;/ **
 *不允许二进制字段编辑
 *有效值为:
 *假允许编辑
 *'一滴'允许编辑,除了BLOB字段
 *'所有'禁止编辑
 *默认= BLOB
 * /
// $ CFG ['ProtectBinary'] ='假';/ **
 *默认语言来使用,如果不是浏览器的定义或用户定义的
 *(您发现语言文件夹所有语言)
 *注释所需行:
 *默认='恩'
 * /
// $ CFG ['DefaultLang'] ='连接';
// $ CFG ['DefaultLang'] ='德';/ **
 *默认的显示方向(水平|垂直| horizo​​ntalflipped)
 * /
// $ CFG ['DefaultDisplay'] ='垂直';
/ **
 *多少列应当用于数据库的表中显示?
 *(的值大于1的结果,其中有些信息被隐藏)
 *默认值= 1
 * /
// $ CFG ['PropertiesNumColumns'] = 2;/ **
 *设置为true,如果你想基于数据库的查询history.If假的,这是利用
 * JS-程序,以显示查询历史(由窗口关闭丢失)
 *
 *这需要启用配置存储,见上面。
 *默认值= FALSE
 * /
// $ CFG ['QueryHistoryDB'] =真;/ **
 *当使用基于数据库的查询历史记录,有多少项应保持?
 *
 *默认值= 25
 * /
// $ CFG ['QueryHistoryMax'] = 100;/ *
 *您可以在documentation.html获得更多的配置选项
 *或在这里:http://wiki.phpmyadmin.net/pma/Config
 * /
?>


解决方案

尝试设置主机属性在phpMyAdmin / config.inc.php文件:

  $ CFG桩[服务器] [$ i] ['主机'] =127.0.0.1;

I am a newbie in MySQL, Apache, PHP, and phpMyAdmin. The first server I built was on Windows Vista x32bit and it was successful. Then, I try to build the second server on another laptop, it is Windows 7 x64bit and it stucked in error code #2054. I use 'localhost' with a fixed IP address. I installed the server individually from .msi files, NOT a package installer.

After I enter my 'root' and my 'password', then I clicked 'Go', it popped up two error messages, one is "#2054 Cannot log in to the MySQL server" and another is "Connection for controluser as defined in your configuration failed."

I searched many resources online, but out of luck.

How can I solve these two errors?

Any info in helpful. Thanks in advance.

Below is my config.inc.php:

enter code here <?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * phpMyAdmin sample configuration, you can use it as base for
 * manual configuration. For easier setup you can use setup/
 *
 * All directives are explained in Documentation.html and on phpMyAdmin
 * wiki <http://wiki.phpmyadmin.net>.
 *
 * @package PhpMyAdmin
 */

 /*
  * This is needed for cookie based authentication to encrypt password in
  * cookie
  */
 $cfg['blowfish_secret'] = 'a8b7c6d'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

 /*
  * Servers configuration
  */
 $i = 0;

 /*
  * First server
  */
 $i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;

/*
 * phpMyAdmin configuration storage settings.
 */

/* User used to manipulate with storage */
// $cfg['Servers'][$i]['controlhost'] = '';
$cfg['Servers'][$i]['controluser'] = 'phpmyadmin';
$cfg['Servers'][$i]['controlpass'] = 'johan1234';

/* Storage database and tables */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma_table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma_tracking';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
$cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';
$cfg['Servers'][$i]['recent'] = 'pma_recent';
/* Contrib / Swekey authentication */
// $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf';

/*
 * End of servers configuration
 */

/*
 * Directories for saving/loading files from server
 */
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';

/**
 * Defines whether a user should be displayed a "show all (records)"
 * button in browse mode or not.
 * default = false
 */
//$cfg['ShowAll'] = true;

/**
 * Number of rows displayed when browsing a result set. If the result
 * set contains more rows, "Previous" and "Next".
 * default = 30
 */
//$cfg['MaxRows'] = 50;

/**
 * Use graphically less intense menu tabs
 * default = false
 */
//$cfg['LightTabs'] = true;

/**
 * disallow editing of binary fields
 * valid values are:
 *   false  allow editing
 *   'blob' allow editing except for BLOB fields
 *   'all'  disallow editing
 * default = blob
 */
//$cfg['ProtectBinary'] = 'false';

/**
 * Default language to use, if not browser-defined or user-defined
 * (you find all languages in the locale folder)
 * uncomment the desired line:
 * default = 'en'
 */
//$cfg['DefaultLang'] = 'en';
//$cfg['DefaultLang'] = 'de';

/**
 * default display direction (horizontal|vertical|horizontalflipped)
 */
//$cfg['DefaultDisplay'] = 'vertical';


/**
 * How many columns should be used for table display of a database?
 * (a value larger than 1 results in some information being hidden)
 * default = 1
 */
//$cfg['PropertiesNumColumns'] = 2;

/**
 * Set to true if you want DB-based query history.If false, this utilizes
 * JS-routines to display query history (lost by window close)
 *
 * This requires configuration storage enabled, see above.
 * default = false
 */
//$cfg['QueryHistoryDB'] = true;

/**
 * When using DB-based query history, how many entries should be kept?
 *
 * default = 25
 */
//$cfg['QueryHistoryMax'] = 100;

/*
 * You can find more configuration options in Documentation.html
 * or here: http://wiki.phpmyadmin.net/pma/Config
 */
?>

解决方案

Try to set host property in phpmyadmin/config.inc.php :

$cfg['Servers'][$i]['host'] = '127.0.0.1';

这篇关于phpMyAdmin的#2054无法登录到MySQL服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆