当连接数据遇到can't connect to mysql server on localhost(0) 的情况时,解决该问题的方法关键在电脑MySQL未启动!!!
解决步骤:
1、打开控制面板,点击管理工具;
2、找到服务选项双击;
3、启动MySQL即可
4、完成测试