"If a worker wants to do his job well, he must first sharpen his tools." - Confucius, "The Analects of Confucius. Lu Linggong"
Front page > Programming > How to Stop MySQL on a Mac OS Installation?

How to Stop MySQL on a Mac OS Installation?

Published on 2024-11-10
Browse:717

How to Stop MySQL on a Mac OS Installation?

Methods to Stop MySQL on a Mac OS Installation

To effectively test application behavior during MySQL outages, shutting down the MySQL server is necessary. Here are the commands required to accomplish this, depending on the installation method used:

Homebrew

Manage MySQL services using the following commands:

  • Start: brew services start mysql
  • Stop: brew services stop mysql
  • Restart: brew services restart mysql

MacPorts

Load and unload the MySQL server with these commands:

  • Load: sudo port load mysql57-server
  • Unload: sudo port unload mysql57-server

Note: Changes made using MacPorts persist after a system reboot.

Binary Installer

Utilize the following commands:

  • Stop: sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop
  • Start: sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
  • Restart: sudo /Library/StartupItems/MySQLCOM/MySQLCOM restart
Latest tutorial More>

Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.

Copyright© 2022 湘ICP备2022001581号-3