wamp mysql 无法连接到本地主机
你好 我试图按照在线教程在 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'] = '';
?>
hello
i tried to follow an online tut for setting password in mysql and this has now led to errors that i cannot recover from.
1) phpMyAdmin-2.11.10
this gives login box with message underneath: cannot load mcrypt. i have enabled in wamp and also put libmcrypt.dll in windows and windows\system32 folders. but still get message.if i put root in login box with no pass, this leads to second error.
2) mysql error
1130 - Host 'localhost' is not allowed to connect to this MySQL server
i have tried various fixes but nothing seems to work. i would be grateful for any help. thanks
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'] = '';
?>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,Wamp 附带已配置的 phpMyAdmin。你用过什么教程?
LE:
这是root用户还是其他帐户?如果我是你,我会备份我的数据(文件和 sql),进行全新的 wamp 安装(最新版本不是你教程中的版本)并执行以下操作:
使用以下命令:
然后转到 phpMyAdmin config.inc 并编辑
重新启动 WAMP 服务器,现在应该可以了。
As far as I know, Wamp comes with phpMyAdmin already configured. What tutorial did you have used?
LE:
Is this the root user or other account? If I were you, I would backup my data ( files and sql ), do a fresh wamp install ( the latest version not the one in your tutorial ) and do the following:
Use the following commands :
Then go to phpMyAdmin config.inc and edit
Restart the WAMP server and should be ok now.