将MySQL根密码重置为“默认". -MAMP [英] Reset MySQL root password to "default" - MAMP

查看:224
本文介绍了将MySQL根密码重置为“默认". -MAMP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在phpMyAdmin上更改了root级密码.我不确定在哪里输入密码本身,因为密码没有给我这个选项(登录表单).我想知道它是否是php.ini文件,但是如果我将密码放在其中,则具有读取特权的用户可以读取它.

I changed my root level password on phpMyAdmin. I was unsure where to enter the password itself, as it did not give me the option (login form). I wondered if it was the php.ini file but users with read privileges could read it if I placed the password in there.

现在,由于我尝试了各种在线资源来解决问题,因此mysql无法运行.如果需要,我将删除Mamp并重新安装,但我不想丢失我的数据库文件.理想情况下,我会将密码恢复为默认密码,我认为那没什么,除非现在我无法连接到phpmyadmin或Mamp起始页面:

Now, the mysql doesn't run as I tried various online resources to fix the problem. If needs be I would delete mamp and re-install but I do not want to lose my database files. Ideally I would revert the password to default, which I believe was nothing, except now I cannot connect to phpmyadmin, or the mamp start page:

Error: Could not connect to MySQL server!

任何帮助都会很棒.

更新-

来自Mamp的错误消息:

Error message from mamp:

/Applications/MAMP/Library/bin/mysqlcheck: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect

推荐答案

使用终端重设密码时,似乎已解决了该问题:

This seemed to have fixed it when using terminal to reset the password:

/Applications/MAMP/Library/bin/mysqladmin -u root -p password newpassword

常见问题解答上找到.

这篇关于将MySQL根密码重置为“默认". -MAMP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆