安装phpMyAdmin 2.11.6出现这样的错误码:#1045 – Access denied for user ‘root’@'localhost’ (using password: NO),于是网上大搜了一把,不过可能网友们安装的的版本过老,给出的答案都不令人满意!差不多都是把libraries目录下的config.default.php复制到根目录改名为config.inc.php,然后再加上用户密码之类的,再设置一些东西就成了,可是我按这样做了,没有什么效果,最后还是找到并解决了!
之前安装前就发现根目录有config.sample.inc.php这个文件,本来我想应该是改这个文件的,可是之前我也有装过(旧版的时候),所以也没有放在心上,后来在海量搜索之后,发现了还是改这个文件为上上策,不过改完之后还要做一些动作才能成功访问的。
只要找到根目录下的config.sample.inc.php文件,复制里面的内容到新建文件config.inc.php里就可以了。 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.cihar.com>.
*
* @version $Id: config.sample.inc.php 10142 2007-03-20 10:32:13Z cybot_tm $
*/
/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = ‘8324′; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
//8324为随便的一个数,随便你写,但是一定要设(是不是一定目前为止我也不是很清楚,所以希望知道的大佬给个说道)
/*
* 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 mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = ‘mysql’;
/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = ‘root’;
$cfg['Servers'][$i]['controlpass'] = ‘123456′;
/* 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'] = ”;
?>
改完之后,问题依旧,这时候我们只需要在网站根目录下建立个文件夹,随便就好,比如PMA,然后再把phpmyadmin整个拉去PMA中就可以,这时候你的访问就变成了http://localhost:8080/pma/phpmyadmin/(我用的是apache,我同时装了IIS)
这时候问题就没有了!
注意:
如果$cfg['blowfish_secret'] = ‘8324′; 没有设置任意值的话,会提示错误信息“配置文件现在需要绝密的短语密码(blowfish_secret)”






什么啊···还是一样没有用··真是的··还以为有用 的说
我这样做成功了,不知道为什么你的不行,你可以发你的错误提示来看看吗?我们可以一起探导一下的!谢谢