Home > Database > Mysql Tutorial > How to Stop MySQL on a Mac OS Installation?

How to Stop MySQL on a Mac OS Installation?

Patricia Arquette
Release: 2024-11-14 14:50:02
Original
582 people have browsed it

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

The above is the detailed content of How to Stop MySQL on a Mac OS Installation?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template