【问题标题】:MySQL not working after updating to Windows 8.1 [closed]更新到 Windows 8.1 后 MySQL 无法工作 [关闭]
【发布时间】:2013-10-31 02:40:31
【问题描述】:

一切正常,我有 Windows 8 和 MySQL 5.6 工作台。

昨天,我升级到了 Windows 8.1,这让 PC 运行得更好,但把 MySQL 搞砸了。

当我进入工作台时,我可以看到我的旧连接,但通过单击它我得到:

Cannot Connect to Database Server
Your connection attempt failed for user 'root' from your host to server at 
127.0.0.1:3306:Can't connect to mysql server on '127.0.0.1'(10061)
Please:
 1. Check that mysql is running on server 127.0.0.1
 2. Check that mysql is running on port 3306 (note: 3306 is the default, but this can be changed)
 3. Check the root has rights to connect to 127.0.0.1 from your address (mysql rights define what clients can connect to the server and from which machines) 
 4. Make sure you are both providing a password if needed and using the correct password for 127.0.0.1 connecting from the host address you're connecting from the host address you're connecting from.

【问题讨论】:

  • 你检查你的防火墙设置了吗?
  • MySQL服务是否启动成功?你的 MySQL 是否在监听 3306 端口?
  • 现在,我关闭了防火墙,它现在可以工作了,但是我所有的 SCHEMAS 都不见了(天哪!!)

标签: mysql mysql-workbench


【解决方案1】:

嗯,卸载工作台并重新安装它就可以了。 未删除所有架构

【讨论】:

  • 我遇到了同样的问题。我卸载并重新安装,但我仍然无法连接。在仪表板上,我可以单击本地实例,然后将我带到“管理”页面,但它在 3 个不同的地方显示“服务器状态:未知”。有什么建议可以吗?
  • 没关系,我想通了。我也不得不重新安装服务dev.mysql.com/doc/refman/5.1/en/windows-start-service.html再次感谢!
  • 这对我不起作用,理查德。我不得不重新安装 MySQL Server 才能让它再次工作。架构未删除。
  • 已确认。这也对我有用。卸载 Workbench & SQL Server,然后重新安装。架构已重新加载。 Windows 8.1 更新很痛苦!
  • 工作台与此无关,它实际上只是服务器没有运行。如果您需要一项服务,请检查它是否存在(我的没有)并根据上述(MySQL)文档在必要时重新安装它。
【解决方案2】:

重新安装mysqld服务确实会让数据库服务器重新启动,但是你会发现你的数据库不见了,你的所有用户详细信息也不见了!

在 Windows 8 下,MySQL 将其数据库存储在 C:\ProgramData\MySQL\MySQL Server 5.5\data 下,而在 8.1 下它全部移动到 C:\Program Files\MySQL\MySQL Server 5.5\data。

解决这个问题的快速方法是:

  • 通过任务栏中的 MySQL Notifier 停止 mysqld 服务
  • 将 C:\ProgramData\MySQL\MySQL Server 5.5 复制到 C:\Program Files\MySQL\MySQL Server 5.5
  • 通过 Notifier 重启 mysqld 服务。

您好,您的数据库和用户凭据又回来了。

【讨论】:

    【解决方案3】:

    升级到 Windows 8.1 后,您需要运行 MySQL 配置向导

    http://dev.mysql.com/doc/refman/5.1/en/mysql-config-wizard-starting.html

    但我无法让它工作,所以不得不重新安装 MySQL 服务器。

    然后将其安装为服务,并指向我之前的数据库:

    mysqld --install MySQL --defaults-file=C:\MySQL\data\my.ini
    

    通过运行检查它是否正常工作

    mysql -u username -p password
    show databases;
    

    【讨论】:

      【解决方案4】:

      在我的情况下,mysql的服务丢失了。使用以下命令重新安装服务:

      mysqld --install [Instance Name] --defaults-file=[My SQL Configuration File]
      

      所以,如果我安装服务,MySQL 是实例名称,D:\MySQL\my.ini 是我之前的配置文件,我执行了以下命令:

      mysqld --install MySQL --defaults-file="D:\MySQL\my.ini"
      

      然后像往常一样启动服务。这应该可以解决问题。

      注意:您必须在具有提升权限的命令提示符下执行这些命令。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2021-12-21
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-08-10
        • 2015-09-01
        • 2011-11-18
        相关资源
        最近更新 更多