佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 1286|回复: 7

phpmyadmin不能login

[复制链接]
发表于 28-8-2006 03:27 PM | 显示全部楼层 |阅读模式
我installed了 mysql 4.1 , phpmyadmin 2.8.1 以及 mysql administrator

我可以用 username : root / password : 123456 来login mysql administrator

但是当我要login phpmyadmin时出现 

#1045 - Access denied for user 'root'@'localhost' (using password: NO)

为何我不能loginn呢? 同时为何using passord: NO ?
回复

使用道具 举报


ADVERTISEMENT

发表于 28-8-2006 07:33 PM | 显示全部楼层
原帖由 一只优雅的猪 于 28-8-2006 03:27 PM 发表
我installed了 mysql 4.1 , phpmyadmin 2.8.1 以及 mysql administrator

我可以用 username : root / password : 123456 来login mysql administrator

但是当我要login phpmyadmin时出现 

#1045 - Acce ...

你设了phpmyadmin\config.inc.php了吗?

例子:

  1. <?php
  2. /*
  3. * Generated configuration file
  4. * Generated by: phpMyAdmin 2.8.2 setup script by Michal &#268;iha&#345; <michal@cihar.com>
  5. * Version: $Id: setup.php,v 1.23.2.10 2006/05/15 07:57:30 nijel Exp $
  6. * Date: Tue, 04 Jul 2006 20:12:06 GMT
  7. */

  8. /* Servers configuration */
  9. $i = 0;

  10. /* Server localhost (config:root) [1] */
  11. $i++;
  12. $cfg['Servers'][$i]['host'] = 'localhost';
  13. $cfg['Servers'][$i]['extension'] = 'mysqli';
  14. $cfg['Servers'][$i]['connect_type'] = 'tcp';
  15. $cfg['Servers'][$i]['compress'] = false;
  16. $cfg['Servers'][$i]['controluser'] = 'root';
  17. $cfg['Servers'][$i]['controlpass'] = '1';
  18. $cfg['Servers'][$i]['auth_type'] = 'config';
  19. $cfg['Servers'][$i]['user'] = 'root';
  20. $cfg['Servers'][$i]['password'] = 'thisismypassword';

  21. /* End of servers configuration */

  22. $cfg['AllowAnywhereRecoding'] = false;
  23. $cfg['DefaultCharset'] = 'utf-8';
  24. $cfg['RecodingEngine'] = 'iconv';
  25. $cfg['IconvExtraParams'] = '//TRANSLIT';
  26. ?>
复制代码
回复

使用道具 举报

 楼主| 发表于 28-8-2006 09:01 PM | 显示全部楼层
why i can't found tat "config.inc.php" in phpmyadmin folder?

i'm using phpmyadmin 2.8.1
回复

使用道具 举报

发表于 28-8-2006 09:26 PM | 显示全部楼层
原帖由 一只优雅的猪 于 28-8-2006 09:01 PM 发表
why i can't found tat "config.inc.php" in phpmyadmin folder?

i'm using phpmyadmin 2.8.1

难道你没看到这行字吗?
Probably reason of this is that you did not create configuration file. You might want to use setup script to create one.
按了过后,它会带你去一个设定config.inc.php的界面。
在设定完毕后那网页会自动帮你generate出来的config.inc.php的code。
所以,你就把那些code存在config.inc.php(当然要手动创立新文件->config.inc.php)就可以了。

你不会设的话,可以参考我所设的例子,也可以去其网站寻找有关设定资料。
不需经过localhost界面,只需直接在phpmyadmin\的directory create个config.inc.php,把那些code存在里面就行了。
回复

使用道具 举报

 楼主| 发表于 29-8-2006 08:21 AM | 显示全部楼层
在config.inc.php,我换了一些setting

$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '123456';


然后在mysql command line client里execute了以下的command

SET PASSWORD FOR 'root'@'localhost' = OLD_PASSWORD('123456');

----------------------------------------------------------------------
现在出现

phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in config.inc.php and make sure that they correspond to the information given by the administrator of the MySQL server.

#1045 - Access denied for user 'root'@'localhost' (using password: YES)
回复

使用道具 举报

发表于 29-8-2006 03:29 PM | 显示全部楼层
原帖由 一只优雅的猪 于 29-8-2006 08:21 AM 发表
在config.inc.php,我换了一些setting

$cfg = 'root';
$cfg = '123456';

然后在mysql command line client里execute了以下的command

SET PASSWORD FOR 'root'@'localhost' = OLD_PASSWORD('123456');
...

$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 这个你用回mysql 的password不行吗?
回复

使用道具 举报

Follow Us
 楼主| 发表于 30-8-2006 02:02 AM | 显示全部楼层
试过了,我放回 $cfg['Servers'][$i]['password'] = 'thisismypassword';
还是不行。。。

我login mysql administrator 是用
username : root / password : 123456
回复

使用道具 举报

发表于 30-8-2006 12:51 PM | 显示全部楼层
原帖由 一只优雅的猪 于 30-8-2006 02:02 AM 发表
试过了,我放回 $cfg = 'thisismypassword';
还是不行。。。

我login mysql administrator 是用
username : root / password : 123456



你会出现这样的error,按理说是
不是
$cfg['Servers'][$i]['controluser']
$cfg['Servers'][$i]['controlpass']
,就是
$cfg['Servers'][$i]['user']
$cfg['Servers'][$i]['pass']
有error了。

既然你讲
login mysql administrator 是用
username : root / password : 123456,
那就证明你肯定你的password是正确。

所以我猜测你应该是之前把我贴的 “$cfg['Servers'][$i]['controlpass'] = 1”也一起copy& paste下去,忘了改吧~所以才。。
controlpass的默认设定必须是跟mysql的root password一样的(当然也可以另外更改)

总之,若你是单一用户的话,只要使用以下的基本设置就可以了:

<?php
$i = 0;
$i++;

$cfg['Servers'][$i]['auth_type'] = 'http';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '123456';
?>

欲知详细设定,或要设多用户与不同权限的功能的话,可以参考:http://www.devside.net/web/server/windows/phpmyadmin

[ 本帖最后由 亡者之疯 于 30-8-2006 12:58 PM 编辑 ]
回复

使用道具 举报


ADVERTISEMENT

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 23-9-2024 03:23 PM , Processed in 0.089772 second(s), 21 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表