Sasikumar Murugesan Sasikumar Murugesan - 9 months ago 35
MySQL Question

mysql server: What is the Difference between "Stop Server" and "Bring Offline"?

I could see

Stop Server
and
Bring Offline
in mysql workbench.

enter image description here

I hope both are used to stop the services but still confused in difference between both in terms of when to use Stop Server and Bring Offline?

Answer Source

Stop server just stops the mysql process

Offline mode is a new feature introduced in MySQL 5.7.5, that basically throw out all users excepts DBAs :

MySQL Server now supports an “offline mode” with these characteristics:

  • Connected client users who do not have the SUPER privilege are disconnected on the next request, with an appropriate error. Disconnection includes terminating running statements and releasing locks. Such clients also cannot initiate new connections, and receive an appropriate error.

  • Connected client users who have the SUPER privilege are not disconnected, and can initiate new connections to manage the server.

  • Replication slave threads are permitted to keep applying data to the server.

Only users who have the SUPER privilege can control offline mode. To put a server in offline mode, change the value of the new offline_mode system variable from OFF to ON. To resume normal operations, change offline_mode from ON to OFF. In offline mode, clients that are refused access receive an ER_SERVER_OFFLINE_MODE error.

Source : Changes in MySQL 5.7.5 (2014-09-25, Milestone 15)