zoukankan      html  css  js  c++  java
  • mysql服务忽然挂了,出现错误信息: Can’t connect to MySQL server on ‘localhost’ (10061)

    报错信息:
    ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost’ (10061)

    1查看服务中有没有启动服务

    发现没有MySQL服务

    2.手动安装mysql服务

    cmd命令打开,在mysql安装的bin目录下面执行:

      >>>  mysqld --install       (注意这里一定是"mysqld",不是"mysql")

    报错,信息如下:

      Install/Remove of the Service Denied

    解决办法:

      打开cmd ,以管理员运行即可。
      当出现:Service successfully installed. 表示服务安装成功。

    3.启动服务

    两种方式:

      1.在windows服务中找到mysql,右键启动服务;

      2.使用命令启动     net start mysql

    4.登录

      

    C:Users12863>mysql -u root -p           
    Enter password: ******
    Welcome to the MySQL monitor. Commands end with ; or g.
    Your MySQL connection id is 14
    Server version: 5.7.11 MySQL Community Server (GPL)             (版本号)

    Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.

  • 相关阅读:
    一个请求在Struts2框架中的处理流程
    最大公约数和最小公倍数--java实现
    项目技术总结
    项目学习经验
    MyEclipse Project Migration功能中文简单介绍
    RSA的傻瓜原理
    Class.forName()的作用
    matplotlib 画封闭图像并填充
    matplotlib 做图通过弹出窗口展示 spyder
    pyodbc 一些内容
  • 原文地址:https://www.cnblogs.com/vhviqd/p/11797180.html
Copyright © 2011-2022 走看看