phpMyAdmin 的登录名是什么? [英] What's the login for phpMyAdmin?
问题描述
我下载了最新版本的 XAMPP (v.1.7.7) 并决定启动一个数据库.当我打开 phpMyAdmin 时,它提醒我有新版本的 phpMyAdmin 可用.我从网上下载了它,然后我删除了旧版本的 phpMyAdmin 并替换为当前版本(v.3.5.1).我打开它,它出现了一个登录屏幕.我在没有密码的情况下输入了root",但它提醒我我需要一个.我不知道任何密码,也不知道任何其他登录方式.如何登录进入phpMyAdmin?
I downloaded the most recent version of XAMPP (v.1.7.7) and decided start a database. When I opened phpMyAdmin, it alerts me there is a new version of phpMyAdmin available. I downloaded it from online, and I deleted the old version of phpMyAdmin and replaced it with the current version (v.3.5.1). I opened it up and it came up with a log-in screen. I entered in "root" without a password, but it alerts me I need one. I don't know any password nor I know any alternative log-ins. How would I log-in to enter phpMyAdmin?
推荐答案
无需密码即可登录,使其正常工作
您需要更改配置文件.打开您的 XAMPP 安装目录,浏览到文件夹 phpmyadmin
,并查找名为 config.inc.php
的文件.如果还没有,您首先需要将 config.sample.inc.php
复制到 config.inc.php
.然后,只需打开 config.inc.php
并找到这一行:
Enabling login without a password, to make it work exactly as before
You'll need to change your configuration file. Open up your XAMPP installation directory, browse to the folder phpmyadmin
, and look for a file called config.inc.php
. If there isn't one already, you'll first need to copy config.sample.inc.php
to config.inc.php
. Then, just open config.inc.php
and find this line:
$cfg['Servers'][$i]['AllowNoPassword'] = false;
改为:
$cfg['Servers'][$i]['AllowNoPassword'] = true;
或者,只需添加密码
打开命令提示符并输入以下内容,然后按 Enter:
mysqladmin -u root -p pass
当它询问您当前密码时,只需再次按 Enter.然后设置新密码,并使用该密码登录 phpMyAdmin.
When it asks you for the current password, just press Enter again. Then set the new password, and log in to phpMyAdmin using that.
这篇关于phpMyAdmin 的登录名是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!