设置 MySQL 的新实例什么是当前根密码?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20222341/
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
Setting up new instance of MySQL what is Current Root Password?
提问by Doug Kimzey
I am new to MySQL and am setting up a new instance of MySQL using the Windows Installer and am being prompted for two passwords.
我是 MySQL 的新手,正在使用 Windows Installer 设置一个新的 MySQL 实例,并被提示输入两个密码。
The Current Root Password and the MySQL Root Password.
当前根密码和 MySQL 根密码。
Is there a standard Current Root Password for new installations?
新安装是否有标准的当前根密码?
What is the difference between the two passwords.
这两个密码有什么区别。
采纳答案by Mad Dog Tannen
The standard password for user root is simply: password
用户 root 的标准密码很简单:password
Each user had its own password. So a password must belong to a user. So the only difference of password are just what they contain.
每个用户都有自己的密码。所以密码必须属于一个用户。所以密码的唯一区别就是它们包含的内容。
root is AFAIK the only user created upon installation. Did you create a new user after installation?
root 是 AFAIK 安装时创建的唯一用户。安装后是否创建了新用户?
回答by AmeeQ
If you don't remember your current root password and want to install new instance of MySQL and you have applied other ways like "-init-file.txt"
, but still failed.
如果您不记得当前的 root 密码并想安装新的 MySQL 实例,并且您已经应用了其他方法,例如"-init-file.txt"
,但仍然失败。
There is another solution which worked for me. Uninstalling MySQL from control panel didn't remove all files, it left some references in the system.
还有另一个对我有用的解决方案。从控制面板卸载 MySQL 并没有删除所有文件,它在系统中留下了一些引用。
To delete MySQL files completely, open the folder path
C:\Users\your pc name\AppData\Roaming
and delete the MySQL folder.Then remove one more reference which is in
C:\ProgramData\MySQL
, if not visible check your folder view options and uncheck "Don't show hidden files".The last reference of MySQL exists in our system services:
Type "Services" in the search box of the taskbar. Find services related to MySQL and note them down. I have two in my case(MySQLRouter and MYSQL80).
Open the command prompt with administrator and type:
sc delete "ServiceName"
,In my case:
sc delete MySQL80
sc delete MySQLRouter
Ensure all services related to MySQL are removed by using the above command. Restart your computer and install your MySQL instance with a new configuration.
要彻底删除 MySQL 文件,请打开文件夹路径
C:\Users\your pc name\AppData\Roaming
并删除 MySQL 文件夹。然后删除 中的另一个引用
C:\ProgramData\MySQL
,如果不可见,请检查您的文件夹视图选项并取消选中“不显示隐藏文件”。MySQL的最后一个引用存在于我们的系统服务中:
在任务栏的搜索框中键入“服务”。查找与 MySQL 相关的服务并记下它们。我有两个(MySQLRouter 和 MYSQL80)。
以管理员身份打开命令提示符并键入:
sc delete "ServiceName"
,就我而言:
sc delete MySQL80
sc delete MySQLRouter
确保使用上述命令删除与 MySQL 相关的所有服务。重新启动计算机并使用新配置安装 MySQL 实例。
回答by Tarun Pratap
The community wiki has an excellent guide on the steps that one needs to follow.
社区 wiki 有一个关于需要遵循的步骤的优秀指南。
Please note that uninstalling MySQL from the installer gives the option to remove all data as well, which by default is unselected.
请注意,从安装程序中卸载 MySQL 也提供了删除所有数据的选项,默认情况下未选中。
Check the box and then uninstall MySQL.
选中该框,然后卸载 MySQL。
After that, follow the guidelines in the community wiki.
之后,请遵循社区 wiki 中的指南。