Cómo detener mysqld
Para averiguar el comando start para mysqld (usando un mac) puedo hacer:
ps aux|grep mysql
Obtengo la siguiente salida, que me permite iniciar mysql server.
/usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=...
¿Cómo encontraría el comando necesario para detener mysql desde la línea de comandos?
12 answers
Intenta:
/usr/local/mysql/bin/mysqladmin -u root -p shutdown
O:
sudo mysqld stop
O:
sudo /usr/local/mysql/bin/mysqld stop
O:
sudo mysql.server stop
Si instala el Launchctl en OSX puede intentar:
MacPorts
sudo launchctl unload -w /Library/LaunchDaemons/org.macports.mysql.plist
sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql.plist
Nota: esto es persistente después del reinicio.
Homebrew
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
Instalador binario
sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop
sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
sudo /Library/StartupItems/MySQLCOM/MySQLCOM restart
Lo encontré en: https://stackoverflow.com/a/102094/58768
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-05-23 12:02:51
Hay una forma alternativa de matar el proceso del demonio llamando a
kill -TERM PID
Donde PID
es el valor almacenado en el archivo mysqld.pid
o el id de proceso mysqld que se puede obtener emitiendo el comando ps -a | grep mysqld
.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-01-10 00:25:33
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-12-31 05:54:35
Para Windows, puede ejecutar este comando directamente si mysql/bin está en su ruta.
mysqladmin -u root -p shutdown
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-05-10 01:07:29
Para el instalador binario use esto:
Para parar:
sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop
Para empezar:
sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
Para reiniciar:
sudo /Library/StartupItems/MySQLCOM/MySQLCOM restart
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-08-04 12:42:10
En OSX 10.8 y en adelante, el control para MySQL está disponible desde las Configuraciones del sistema. Abra Preferencias del Sistema, haga clic en Mysql (generalmente en la parte inferior) e inicie/detenga el servicio desde ese panel. https://dev.mysql.com/doc/refman/5.6/en/osx-installation-launchd.html
El archivo plist está ahora en /Library/LaunchDaemons/com.oráculo.OSS.mysql.mysqld.plist
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-06-23 14:15:23
Lo hice con el siguiente comando:
sudo killall mysqld
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-07-31 08:14:19
Lo que funcionó para mí en CentOS 6.4 era ejecutar service mysqld stop
como usuario root.
Encontré mi respuesta en nixCraft.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-01-05 22:12:30
Matar es definitivamente el camino equivocado! El PID se quedará, Replicationsjobs serán asesinados, etc. sucesivamente.
DETENER el servidor MySQL
/sbin / service mysql stop
INICIAR servidor MySQL
/sbin / service mysql start
REINICIE MySQL Server
/sbin / service mysql restart
Tal vez se necesite sudo si no tiene suficientes derechos
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-12-18 08:45:48
Si mi mysql mantiene reiniciar sudo rm -rf /usr/local/var/mysql/dev.work.err
mysql.server stop
funcionó para mí.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-01-18 06:15:12
Funcionó para mí en mac
A) Detener el proceso
sudo launchctl list | grep -i mysql
Si el resultado muestra algo como: "xxx.xxx.mysqlxxx"
sudo launchctl remove xxx.xxx.mysqlxxx
Ejemplo:
sudo launchctl remove org.macports.mysql56-server
B) Desactivar para iniciar automáticamente el proceso
sudo launchctl unload -wF /Library/LaunchDaemons/xxx.xxx.mysqlxxx.plist
Ejemplo:
sudo launchctl unload -wF /Library/LaunchDaemons/org.macports.mysql56-server.plist
- Finalmente reinicie su mac
Nota: En algunos casos, si ha intentado "a)" primero, debe reiniciar de nuevo antes de intentar b).
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-08-16 13:49:16
/etc/init.d/mysql stop<br>
service mysql stop<br>
killall -KILL mysql mysqld_safe mysqld<br>
When you see the following information, you success
mysql: no process found<br>
mysqld_safe: no process found<br>
mysqld: no process found
Uso esto para resolver el problema de instalación de MySQL 5.6 en Ubuntu 15.10 usando este enlace.
Durante esta instalación, me encuentro con el problema diciendo:
"mysqld_safe A mysqld process already exists"
Simplemente detenga completamente el mysqld, mysqld_safe, mysql resuelve el problema.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-05-13 05:02:31