1. <legend id='axSG7'><style id='axSG7'><dir id='axSG7'><q id='axSG7'></q></dir></style></legend>

    <small id='axSG7'></small><noframes id='axSG7'>

        <bdo id='axSG7'></bdo><ul id='axSG7'></ul>

      <i id='axSG7'><tr id='axSG7'><dt id='axSG7'><q id='axSG7'><span id='axSG7'><b id='axSG7'><form id='axSG7'><ins id='axSG7'></ins><ul id='axSG7'></ul><sub id='axSG7'></sub></form><legend id='axSG7'></legend><bdo id='axSG7'><pre id='axSG7'><center id='axSG7'></center></pre></bdo></b><th id='axSG7'></th></span></q></dt></tr></i><div id='axSG7'><tfoot id='axSG7'></tfoot><dl id='axSG7'><fieldset id='axSG7'></fieldset></dl></div>
    1. <tfoot id='axSG7'></tfoot>

      如何找出MySQL root密码

      How to find out the MySQL root password(如何找出MySQL root密码)

        <small id='QobT3'></small><noframes id='QobT3'>

          <bdo id='QobT3'></bdo><ul id='QobT3'></ul>
          1. <i id='QobT3'><tr id='QobT3'><dt id='QobT3'><q id='QobT3'><span id='QobT3'><b id='QobT3'><form id='QobT3'><ins id='QobT3'></ins><ul id='QobT3'></ul><sub id='QobT3'></sub></form><legend id='QobT3'></legend><bdo id='QobT3'><pre id='QobT3'><center id='QobT3'></center></pre></bdo></b><th id='QobT3'></th></span></q></dt></tr></i><div id='QobT3'><tfoot id='QobT3'></tfoot><dl id='QobT3'><fieldset id='QobT3'></fieldset></dl></div>

              <legend id='QobT3'><style id='QobT3'><dir id='QobT3'><q id='QobT3'></q></dir></style></legend>
                <tbody id='QobT3'></tbody>

              <tfoot id='QobT3'></tfoot>
              • 本文介绍了如何找出MySQL root密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我不知道我的 MySQL 根密码;我怎样才能找到这个?是否有任何文件存储此密码?

                I cannot figure out my MySQL root password; how can I find this out? Is there any file where this password is stored?

                我正在关注这个 link 但我关注本地没有directadmin目录.

                I am following this link but I do not have directadmin directory in local.

                推荐答案

                感谢@thusharaK,我可以在不知道旧密码的情况下重置 root 密码.

                thanks to @thusharaK I could reset the root password without knowing the old password.

                在 ubuntu 上我做了以下事情:

                On ubuntu I did the following:

                sudo service mysql stop
                sudo mysqld_safe --skip-grant-tables --skip-syslog --skip-networking
                

                然后在新终端中运行mysql:

                Then run mysql in a new terminal:

                mysql -u root
                

                并运行以下查询以更改密码:

                And run the following queries to change the password:

                UPDATE mysql.user SET authentication_string=PASSWORD('password') WHERE User='root';
                FLUSH PRIVILEGES;
                

                在 MySQL 5.7 中,mysql.user 表字段中的密码字段被删除,现在字段名称为authentication_string".

                退出mysql安全模式,启动mysql服务:

                Quit the mysql safe mode and start mysql service by:

                mysqladmin shutdown
                sudo service mysql start
                

                这篇关于如何找出MySQL root密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Bogus foreign key constraint fail(虚假外键约束失败)
                how to get last insert id after insert query in codeigniter active record(如何在codeigniter活动记录中插入查询后获取最后一个插入ID)
                Force InnoDB to recheck foreign keys on a table/tables?(强制 InnoDB 重新检查表/表上的外键?)
                How to auto generate migrations with Sequelize CLI from Sequelize models?(如何使用 Sequelize CLI 从 Sequelize 模型自动生成迁移?)
                Clear MySQL query cache without restarting server(无需重启服务器即可清除 MySQL 查询缓存)
                ALTER TABLE to add a composite primary key(ALTER TABLE 添加复合主键)

                    <tbody id='JgNw5'></tbody>

                  1. <small id='JgNw5'></small><noframes id='JgNw5'>

                      <tfoot id='JgNw5'></tfoot>
                      • <bdo id='JgNw5'></bdo><ul id='JgNw5'></ul>

                        1. <i id='JgNw5'><tr id='JgNw5'><dt id='JgNw5'><q id='JgNw5'><span id='JgNw5'><b id='JgNw5'><form id='JgNw5'><ins id='JgNw5'></ins><ul id='JgNw5'></ul><sub id='JgNw5'></sub></form><legend id='JgNw5'></legend><bdo id='JgNw5'><pre id='JgNw5'><center id='JgNw5'></center></pre></bdo></b><th id='JgNw5'></th></span></q></dt></tr></i><div id='JgNw5'><tfoot id='JgNw5'></tfoot><dl id='JgNw5'><fieldset id='JgNw5'></fieldset></dl></div>
                          <legend id='JgNw5'><style id='JgNw5'><dir id='JgNw5'><q id='JgNw5'></q></dir></style></legend>