Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove mysqld from autostart

I installed mysql via Homebrew using these instructions http://blog.teamtreehouse.com/installing-ruby-rails-and-mysql-on-os-x-lion.

I also added it to the auto-start by using these commands:

mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/mysql/5.5.15/com.mysql.mysqld.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist

Since it takes up a lot of RAM I'd like to remove it from the auto-start but don't know how to accomplish this. How can I remove mysqld from the autostart?

launchtl list | grep mysql only gives these entries which can't be removed

4104 - homebrew.mxcl.mysql

4317 - 0x7f90704148e0.anonymous.mysqld

like image 850
Hedge Avatar asked Nov 13 '13 09:11

Hedge


People also ask

Why is MySQL always running?

MySql is a server, running all the time, unless you install it "on-demand" and run and stop it yourself. MySql Workbench is nothing but a client that connects to a server, it has nothing to do with the server itself.

How do I stop MySQL from opening on startup Ubuntu?

In Ubuntu 18.04, sudo systemctl disable mysql will prevent mysql-server from autostarting on boot. For linux, there are 3 main init systems: Systemd , Upstart and SysV . Although nearly all Linux systems run on Systemd. The other two init systems might also co-exist in your system.

Does MySQL start automatically?

systemd, the mysqld_safe and mysql. server scripts, Solaris SMF, and the macOS Startup Item (or MySQL Preference Pane) can be used to start the server manually, or automatically at system startup time.


2 Answers

If you installed mysql using brew/homebrew, then remove using

rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
like image 175
ranjeet Avatar answered Sep 30 '22 06:09

ranjeet


launchctl unload -w ~/Library/LaunchAgents/com.mysql.mysqld.plist

Or just remove the ~/Library/LaunchAgents/com.mysql.mysqld.plist file.

like image 23
deceze Avatar answered Sep 30 '22 07:09

deceze