MySQL phpMyAdmin MySQL密码重置不允许我登录
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8324402/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
phpMyAdmin MySQL password reset does not let me login
提问by Gunnit
Hey and thanks for reading, i am locked out of my own server...
嘿,感谢阅读,我被锁定在我自己的服务器之外......
I went to http://localhost/security/
and changed the mysql password for the root user , apparently was not such a good idea because i cant access my phpmyadmin site anymore to configure mysql, WHY?
我去http://localhost/security/
更改了 root 用户的 mysql 密码,显然不是一个好主意,因为我无法再访问我的 phpmyadmin 站点来配置 mysql,为什么?
I've looked online but all they talk about is how to reset your password, I would like to know how I can login into the current phpmyadmin now after i changed the mysql password .
我在网上看过,但他们谈论的是如何重置密码,我想知道在更改 mysql 密码后如何登录当前的 phpmyadmin。
Please help this vulnerable noob be less vulnerable
请帮助这个脆弱的菜鸟不那么脆弱
Bonus: Is there a way to protect the sites on local host with a password
奖励:有没有办法用密码保护本地主机上的站点
回答by abhinav
find the config.inc.php
file in your phpmyadmin folder and you'll be able to enter the password to use.
config.inc.php
在 phpmyadmin 文件夹中找到该文件,然后您就可以输入要使用的密码了。
回答by Mona Abdelmajeed
are you using windows ???
你在用窗户???
if yes
如果是
I tried to login after edit password in
config.inc.php
as @abhinav say butwith no result :(
我尝试
config.inc.php
像@abhinav 所说的那样在编辑密码后登录,但是没有结果:(
but i think you can login using this way
但我认为您可以使用这种方式登录
in localhost password is saved in database called mysql
在 localhost 密码保存在名为mysql 的数据库中
and the user table is users
和用户表是用户
if i were you
如果我是你
if i have script in my localhost
如果我的本地主机中有脚本
i will try to edit php files and make sql injection hole or sql query
我将尝试编辑 php 文件并制作 sql 注入孔或 sql 查询
to get the password from mysql.users and crack it or edit it
从 mysql.users 获取密码并破解或编辑
other way is
另一种方式是
database is stored in files in this path like me
数据库像我一样存储在这个路径中的文件中
c:/appserv/mysql/data/mysql/users.myd
c:/appserv/mysql/data/mysql/users.myd
my localhost password is 1 and this is my file
我的本地主机密码是 1,这是我的文件
My users.myd file and mypassword is 1
我的 users.myd 文件和 mypassword 是 1
Try To Replace This File With Your File :)
尝试用您的文件替换此文件:)
BestRegards
此致
回答by nsblenin
I changed the password of root user in phpmyadmin
(xampp) and then I could not enter to phpmyadmin. The #1045 error did not appear but the page to enter the password was reloaded again. But when I connected to the database by using a sql manager (heidiSQL
), I could enter using root user and password I changed.
我在phpmyadmin
(xampp)中更改了root用户的密码,然后我无法进入phpmyadmin。#1045 错误没有出现,但是再次重新加载了输入密码的页面。但是当我使用sql manager(heidiSQL
)连接到数据库时,我可以使用我更改的root用户和密码进入。
I tried to change the $cfg['Servers'][$i]['auth_type']
to http
, but it didn't work. Then I tried to enter to phpmyadmin using 127.0.0.1/phpmyadmin
and I could enter using the password I changed.
我试图将 更改$cfg['Servers'][$i]['auth_type']
为http
,但是没有用。然后我尝试使用 phpmyadmin 进入127.0.0.1/phpmyadmin
,我可以使用我更改的密码进入。