Reset MySQL root password to quot;defaultquot; - MAMP(将 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:将 MySQL 根密码重置为“默认"- MAMP
基础教程推荐
- SQL:使用来自具有相同列名的两个表中的数据... 2021-01-01
- 如何使用 mysql.connector 禁用查询缓存 2022-01-01
- SQL 效率:WHERE IN 子查询 vs. JOIN 然后 GROUP 2021-01-01
- 是否可以执行按位分组功能? 2021-01-01
- SQL Server 实例在登录协商期间返回无效或不受支持的协议版本 2021-01-01
- 无法解决整理冲突 2021-01-01
- 需要 MySQL 5.1 中的抽象触发器来更新审计日志 2021-01-01
- SSMS 中的权限问题:“对象 'extended_properties'、数据库 'mssqlsystem_resource'、... 错误 229)上的 SELECT 权限被拒绝" 2022-01-01
- 在 SQL 中连接多个表 2021-01-01
- 将 SQL Server DateTime 列迁移到 DateTimeOffset 2021-01-01
