MySQL报错Could not connect, server may not be running. Unable to connect to localhost:3306

MySQL报错Could not connect, server may not be running. Unable to connect to localhost:3306


)

MySQL报错Could not connect, server may not be running. Unable to connect to localhost:3306如何解决!

我的电脑是因为前几天设置了MySQL服务的手动启动,所以今天在运行时,直接打开workbench就会显示上述问题,本来想靠cmd打开

mysql -uroot -p

但是依旧显示无法连接主机。

最后依照如下方式,手动启动了MySQL服务。

  1. 鼠标右击我的电脑 >管理,打开计算机管理界面>在这里插入图片描述>服务和应用程序>服务>找到MySQL80(不同版本显示不一样,但是开头都是MySQL),右键启动即可!在这里插入图片描述
    如果嫌麻烦,也可以在这里把它设置为自动启动

猜你喜欢

转载自blog.csdn.net/grin1386/article/details/108907738