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

查看:39
本文介绍了将 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

mamp 常见问题解答上找到.

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

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