0

您好,我尝试按照在线 tut 在 mysql 中设置密码,现在这导致了我无法恢复的错误。

1) phpMyAdmin-2.11.10 这给出了登录框,下面有消息:无法加载 mcrypt。我已在 wamp 中启用并将 libmcrypt.dll 放在 windows 和 windows\system32 文件夹中。但仍然会收到消息。如果我将 root 放入登录框而没有通过,这会导致第二个错误。

2)mysql错误

1130 - 主机 'localhost' 不允许连接到这个 MySQL 服务器

我尝试了各种修复,但似乎没有任何效果。我将不胜感激。谢谢

phpMyAdmin-2.11.10 mysql4.1.22 php4.4.7

phpmyadmin config.inc.php

<?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 scripts/setup.php
 *
 * All directives are explained in Documentation.html and on phpMyAdmin
 * wiki <http://wiki.phpmyadmin.net>.
 *
 * @version $Id: config.sample.inc.php 12304 2009-03-24 12:56:58Z nijel $
 */

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

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

/*
 * First server
 */
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'config';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';
/* User for advanced features */
// $cfg['Servers'][$i]['controluser'] = 'pma';
// $cfg['Servers'][$i]['controlpass'] = 'pmapass';
/* Advanced phpMyAdmin features */
// $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]['designer_coords'] = 'pma_designer_coords';

/*
 * End of servers configuration
 */

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

?>
4

1 回答 1

3

据我所知,Wamp 已经配置了 phpMyAdmin。你用过什么教程?

乐:

这是root用户还是其他帐户?如果我是你,我会备份我的数据(文件和 sql),重新安装 wamp(最新版本不是你教程中的版本)并执行以下操作:

  • 转到开始-> 运行,输入 cmd
  • 使用 cd 命令导航 mysql.exe 的安装位置

使用以下命令:

mysql>
mysql>update mysql.user SET password=password("newpassword") hit enter
mysql>where user="root"; hit enter
Query OK


mysql>Flush Privileges; hit enter
Query OK
mysql>quit hit enter
mysql>bye

然后转到 phpMyAdmin config.inc 并编辑

$cfg['Servers'][$i]['password'] = 'newpassword';

重新启动 WAMP 服务器,现在应该可以了。

于 2011-06-05T12:41:22.983 回答