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.

  • 相关阅读:
    DS博客作业02--栈和队列
    DS博客作业03--树
    C博客作业05--指针
    C语言博客作业04--数组
    C博客作业03--函数
    C博客作业02--循环结构
    C博客作业01--分支、顺序结构
    我的第一篇博客作业
    java购物车案例
    第三周-自主学习任务-面向对象基础与类的识别
  • 原文地址:https://www.cnblogs.com/vhviqd/p/11797180.html
Copyright © 2011-2022 走看看