<i id='WSGv3'><tr id='WSGv3'><dt id='WSGv3'><q id='WSGv3'><span id='WSGv3'><b id='WSGv3'><form id='WSGv3'><ins id='WSGv3'></ins><ul id='WSGv3'></ul><sub id='WSGv3'></sub></form><legend id='WSGv3'></legend><bdo id='WSGv3'><pre id='WSGv3'><center id='WSGv3'></center></pre></bdo></b><th id='WSGv3'></th></span></q></dt></tr></i><div id='WSGv3'><tfoot id='WSGv3'></tfoot><dl id='WSGv3'><fieldset id='WSGv3'></fieldset></dl></div>
  • <small id='WSGv3'></small><noframes id='WSGv3'>

    <tfoot id='WSGv3'></tfoot>
    1. <legend id='WSGv3'><style id='WSGv3'><dir id='WSGv3'><q id='WSGv3'></q></dir></style></legend>
          <bdo id='WSGv3'></bdo><ul id='WSGv3'></ul>

        WAMP 中的 phpmyadmin 错误 #1045 - 需要重置密码

        时间:2023-10-11

        <tfoot id='XK2TX'></tfoot>

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

                <i id='XK2TX'><tr id='XK2TX'><dt id='XK2TX'><q id='XK2TX'><span id='XK2TX'><b id='XK2TX'><form id='XK2TX'><ins id='XK2TX'></ins><ul id='XK2TX'></ul><sub id='XK2TX'></sub></form><legend id='XK2TX'></legend><bdo id='XK2TX'><pre id='XK2TX'><center id='XK2TX'></center></pre></bdo></b><th id='XK2TX'></th></span></q></dt></tr></i><div id='XK2TX'><tfoot id='XK2TX'></tfoot><dl id='XK2TX'><fieldset id='XK2TX'></fieldset></dl></div>
                • <bdo id='XK2TX'></bdo><ul id='XK2TX'></ul>
                  <legend id='XK2TX'><style id='XK2TX'><dir id='XK2TX'><q id='XK2TX'></q></dir></style></legend>
                    <tbody id='XK2TX'></tbody>
                • 本文介绍了WAMP 中的 phpmyadmin 错误 #1045 - 需要重置密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我最近在我的 PC 上重新安装了 WAMP,并从我拥有的备份中复制了文件.我可以毫无问题地访问 localhost 并且我现有的网站运行良好.

                  I have recently reinstalled WAMP on my PC and copied over files from a back-up I had. I am able to access localhost without any problem and my existing sites function fine.

                  问题是我似乎无法通过 http://localhost/phpmyadmin/index.php 登录.我收到 #1045 无法登录 MySQL 服务器 响应.

                  The problem is that I cannot seem to log-in via http://localhost/phpmyadmin/index.php. I receive a #1045 Cannot log in to the MySQL server response.

                  在做了一些阅读之后我已经导致相信我可以编辑 phpmyadmin 的 config.inc.php 文件来调整设置.设置我的文件后(如下所述),我只是收到一个无法连接:无效设置.错误.

                  After doing some reading I have been lead to believe that I can edit phpmyadmin's config.inc.php file to adjust the settings. After setting my files (as outlined below), I just get a Cannot connect: invalid settings. error.

                     <?php
                  /*
                   * This is needed for cookie based authentication to encrypt password in
                   * cookie
                   */
                  $cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */
                  
                  /*
                   * Servers configuration
                   */
                  $i = 0;
                  
                  /*
                   * First server
                   */
                  $i++;
                  
                  /* Authentication type and info */
                  $cfg['Servers'][$i]['auth_type'] = 'config';
                  $cfg['Servers'][$i]['user'] = 'root';
                  $cfg['Servers'][$i]['password'] = '';
                  $cfg['Servers'][$i]['AllowNoPasswordRoot'] = true;
                  
                  /* User for advanced features */
                  $cfg['Servers'][$i]['controluser'] = 'pma';
                  $cfg['Servers'][$i]['controlpass'] = '';
                  
                  /* Advanced phpMyAdmin features */
                  $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
                  $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
                  $cfg['Servers'][$i]['relation'] = 'pma_relation';
                  $cfg['Servers'][$i]['table_info'] = 'pma_table_info';
                  $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
                  $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
                  $cfg['Servers'][$i]['column_info'] = 'pma_column_info';
                  $cfg['Servers'][$i]['history'] = 'pma_history';
                  $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
                  
                  /*
                   * End of servers configuration
                   */
                  
                  ?>
                  

                  谁能指出我可以做些什么来解决问题?

                  我正在使用 PHP 5.4.12 和 mySQL 5.6.12 运行 WAMP 2.我还尝试登录 WAMP 中的 mySQL 控制台,但无法通过密码请求...

                  I am running WAMP 2 using PHP 5.4.12 and mySQL 5.6.12. I've also attempted to log into the mySQL Console in WAMP but I cannot get past the password request...

                  推荐答案

                  如果问题只是忘记了密码,这将允许您重置它.但是,如果您将不兼容的数据库与 MySQL Server 版本混合使用,一旦您重置密码,稍后就会出现其他问题.

                  If the problem is just a forgotten password this will allow you to reset it. However if you have mixed incompatible databases with MySQL Server versions there will be other problems later once you have reset the password.

                  停止mysql服务

                  wampmanager ->MySQL ->服务 ->停止服务

                  编辑 my.ini 文件

                  Edit the my.ini file

                  wampmanager ->MySQL ->my.ini

                  在ini文件中找到[wampmysqld]部分.在 [wampmysqld]

                  Find the [wampmysqld] section in the ini file. Add this line directly after the section [wampmysqld]

                  skip-grant-tables
                  

                  重启mysql服务.wampmanager ->MySQL ->服务 ->启动/恢复服务

                  打开 MySQL 控制台wampmanager ->MySQL ->MySQL 控制台

                  Open the MySQL console wampmanager -> MySQL -> MySQL Console

                  现在我们要重置root用户的密码,当然这可以用来重置任何用户的密码.在mysql>命令提示符下输入以下2条命令,每行末尾有一个分号,每行后按ENTER向mysql发出命令.

                  Now we are going to reset the password for the root user, of course this could be used to reset any users password. Enter the following 2 commands at the mysql> command prompt, each with a semi colon at the end of a line, and press ENTER after each line to issue the command to mysql.

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

                  MySQL 5.7.0 之后的版本

                  UPDATE mysql.user SET authentication_string = PASSWORD('MyNewPass'), 
                                        password_expired = 'N' 
                  WHERE User = 'root';
                  FLUSH PRIVILEGES;
                  

                  注意更新应该报告它已经更新了不止一行,那是因为实际上有3个用户帐户的用户ID为'root',每个帐户都有不同的域

                  Note that the update should report that it has updated more than one row, that is because there are actually 3 user accounts with the userid of 'root' each with a different domain

                  即127.0.0.1、本地主机和::1*

                  i.e. 127.0.0.1, localhost and ::1*

                  现在在 mysql 命令提示符处输入 'quit' 以存在 mysql.

                  Now enter 'quit' at the mysql command promt to exist mysql.

                  停止mysql服务wampmanager ->MySQL ->服务 ->停止服务

                  编辑 my.ini 文件wampmanager ->MySQL ->my.ini

                  Edit the my.ini file wampmanager -> MySQL -> my.ini

                  在ini文件中找到[wampmysqld]部分删除我们之前添加的 skip-grant-tables 参数.

                  Find the [wampmysqld] section in the ini file Remove the skip-grant-tables parameter we added earlier.

                  不要将此参数留在ini文件中,这是一个巨大的安全漏洞.

                  重启mysql服务.wampmanager ->MySQL ->服务 ->启动/恢复服务

                  这篇关于WAMP 中的 phpmyadmin 错误 #1045 - 需要重置密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:phpMyAdmin 错误:#1054 - 'order 子句'中的未知列'systeem_ei 下一篇:PhpMyAdmin 配置文件错误

                  相关文章

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

                  <small id='0xYaG'></small><noframes id='0xYaG'>

                • <tfoot id='0xYaG'></tfoot>

                  <legend id='0xYaG'><style id='0xYaG'><dir id='0xYaG'><q id='0xYaG'></q></dir></style></legend>

                    • <bdo id='0xYaG'></bdo><ul id='0xYaG'></ul>