MySQL重新安装,但root密码仍然存在,我忘记了
我忘记了 Windows 7 上 MySQL 5.1 的 root 密码 我卸载并删除了 Program Files 中的 MySQL 目录
然后我安装了 5.5,但出现错误 1045,提示: Access Denied for user: 'root@localhost'
我以为卸载 MySQL 并重新安装将允许我创建一个新的 root 密码,但显然不是。请帮忙!
I forgot my root password in MySQL 5.1 on Windows 7
I uninstalled and deleted the MySQL directory in Program Files
Then I installed 5.5, but get error 1045, saying: Access denied for user: 'root@localhost'
I thought that uninstalling MySQL, and reinstalling would allow me to create a new root password, but apparently not. Please help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
实际上,即使卸载MySQL后,数据仍然保留在未被自行删除的目录中。因此,如果您想从头开始重新安装它,请按照以下简单步骤操作:
使用 Windows 7/8,您需要执行以下操作:
C:\Program Files\MySQL
C:\ProgramData\MySQL
C:\Users\rdoverby\AppData\Roaming\MySQL
然后希望它能正常工作!
Actually even after uninstalling the MySQL the data still remains in the directory which is not deleted by itself. So if you want to reinstall it from scratch then follow these simple steps:
Using Windows 7/8, here's what you need to do:
C:\Program Files\MySQL
C:\Program Files (x86)\MySQL
C:\ProgramData\MySQL
C:\Users\rdoverby\AppData\Roaming\MySQL
And then it will hopefully work fine!
mysql.com 上有一个名为 重置 的指南Root 密码:Windows 系统。
There's a guide on mysql.com called Resetting the Root Password: Windows Systems.
使用 mysqld 的 init-file 选项很容易
添加
或者最好添加
到 /reset.mysqld 文件中
编辑 /etc/my.cnf 以指向此文件
重新启动 mysqld,删除 /reset。 mysqld 并将 my.cnf 恢复到之前的状态。
It's easy to use the init-file option to mysqld
Add either
Or preferably
to a file say /reset.mysqld
Edit your /etc/my.cnf to point to this file
Restart mysqld, remove /reset.mysqld and revert your my.cnf to what it was before.
C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.6
(Windows XP) 处的 MySQL Server Application Data 文件夹。C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.6
(Windows XP).以下内容对我来说效果很好,
现在您可以使用 MYSQL 安装程序 来完成此操作。我下载了 250MB 的文件。在那里,您可以删除所有导致此类问题的工具(如果它们可能已过时)以及所有 MYSQL 文件(注意:在卸载现有工具后要求删除这些文件)。然后您可以再次使用相同的 SQL 安装程序来安装它们。
问题解决了。
The following worked for me just fine,
Now you can do this using the MYSQL installer.I downloaded the 250MB file. There you can remove all the tools (In cases they can be out dated) as well as all the MYSQL files (NOTE: These are asked to remove after uninstalling the existing tools) that causes these kind of problems. Then again you can install them using the same SQL installer.
Problem solved.
卸载MySql然后转到C盘取消隐藏程序数据文件夹&删除其中的 MySql 文件夹..现在再次重新安装 MySQL
Uninstall the MySql than Go to C drive unhide the program data folder & delete the MySql folder which is lies inside it ..now reinstall the MySQL again