启动MySQL报错:ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

在安装完mysql的时候遇到此问题:

启动MySQL报错:ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

 

 解决方法:

1、win键+R  弹出框,输入services.msc 进入应用程序服务,

启动MySQL报错:ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

启动MySQL报错:ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

 

 查看是否有MySQL服务,若没有,则表示没有安装此服务。

2、

若没有安装,则进入命令提示符输入命令:mysqld -install 

启动MySQL报错:ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

 

安装成功后就去服务启动它。

 若已经有mysql服务,则检查是否启动

启动MySQL报错:ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

 

启动MySQL报错:ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

上一篇:sqlserver 对查询后的结果直接修改


下一篇:使用spring boot+jpa关联mysql的表出现Cannot resolve table 'XXX'