是否可以从PhPMyAdmin连接错误页面得出MySQL是否正在运行的结论? [英] Is it possible to conclude if MySQL is running from PhPMyAdmin connection error page?

查看:71
本文介绍了是否可以从PhPMyAdmin连接错误页面得出MySQL是否正在运行的结论?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在阅读了多个用户的问题后,例如:

After reading multiple questions of users with problems like:

  • 忘记密码
  • 安装了多个MySQL实例
  • 忘记启动MySQL
  • 等等等

我开始考虑是否真的有可能从错误页面中得出结论,如果MySQL完全在运行?

I started to consider if it is actually possible to conclude from the error page if MySQL is running at all?

具有相同答案类型的问题:

Questions with the same type of answers:

  • mysql said: Cannot connect: invalid settings. xampp
  • phpMyAdmin - can't connect - invalid setings - ever since I added a root password - locked out
  • MySQL Says: Cannot connect: invalid settings

但是错误页面实际上是说这是mysql服务器响应还是无法连接(例如服务器未在运行)

But does the error page actually say this is a mysql server response or it couldn't connect (server isn't running for instance)

采用以下代码:

<?php
//Step1
 $db = mysqli_connect('localhost','username','password','database_name')
 or die('Error connecting to MySQL server.');
?>

如果输入之一不正确,您将得到错误:

If one of the inputs is incorrect you will get the error:

连接到MySQL服务器时出错.

Error connecting to MySQL server.

可以将其修改为美观的错误消息(如上图所示).

This could be modified into a nice looking error message (as the image above).

那么错误实际上证明MySQL是否正在运行吗?

So does the error actually prove that MySQL is running or not?

推荐答案

我找到了有关如何解决此错误的演练视频.在视频中,您可以看到服务器正在运行.我对整个问题都很好奇.

I found a video of a walkthrough on how to fix this error. In the video you can see the servers are running. I was pretty curious about this whole issue.

链接到Youtube: https://www.youtube.com/watch?v=8fK_DYvosA8

Link to Youtube: https://www.youtube.com/watch?v=8fK_DYvosA8

我假设这是视频的工作方式,通常就是这样.我正在解决一个想法,除非它正在运行,否则无法给您错误消息.

I'm assuming if that's how it worked for the video, that's how it works in general. I'm working off the idea that something can't give you an error message unless it's running.

这篇关于是否可以从PhPMyAdmin连接错误页面得出MySQL是否正在运行的结论?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆