简体   繁体   English

重启Nginx会影响mysql吗?

[英]Restarting Nginx affect mysql?

Does restarting my Nginx service in Ubuntu affect the mysql service? 在Ubuntu中重启我的Nginx服务是否会影响mysql服务? an example would be, if I stop the nginx service, would the traffic to website stop and the mysql database/service still work? 一个例子是,如果我停止nginx服务,到网站的流量会停止并且mysql数据库/服务仍然有效吗?

I would appreciate any help 我将不胜感激任何帮助

最安全的方法是重新加载它,对于有兴趣的人来说,它不会碰到mysql,因此与其编写sudo /etc/init.d/nginx restart,您只需更改restart以重新加载

The MySQL service its self will continue to run, so if you are using it via CLI, or a remote connection that will not be interrupted. MySQL服务本身将继续运行,因此,如果通过CLI或不会中断的远程连接使用它,则该服务将继续运行。

However if you were for example using a PHP script which was being run by nginx and had an open connection to MySQL, that connection could be terminated and the user may get some kind of error. 但是,例如,如果您使用的是由nginx运行的PHP脚本,并且与MySQL的连接断开,则该连接可能会终止,并且用户可能会遇到某种错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM