更新时间:2023-01-20 14:15:06
您的 linux 机器上似乎没有运行 mysql 服务.您可以使用 systemctl
It looks like mysql service is not running on your linux machine. You can check the whether the service is running or not using systemctl
systemctl status mysql
如果服务没有运行,您可以使用 systemctl
If the service is not running you can start the service using systemctl
sudo systemctl start mysql
但这只会为当前会话启动服务.如果您重新启动机器,您必须再次启动 mysql
服务器.要在重新启动时自动启动服务,请执行
But this will start the service for the current session only. If you reboot the machine you have to again start the mysql
server. To auto start the service on reboot execute
sudo systemctl enable mysql