How to start/stop MySQL server on Linux Cómo iniciar / detener servidor MySQL en Linux
# To Start MySQL Server # Para iniciar el servidor MySQL
/sbin/service mysqld start / sbin / service mysqld comienzo
# To Stop MySQL Server # Para parar el servidor MySQL
/sbin/service mysqld stop / sbin / service mysqld stop
# To Restart MySQL Server # Para reiniciar el servidor MySQL
/sbin/service mysqld restart / sbin / service mysqld restart
And of course there is the brute force way to kill all the processes: Y, por supuesto, está la fuerza bruta manera de matar a todos los procesos:
$ for i in `ps -ef |grep mysqld |awk ‘{print $2}’`; do `kill -9 $i`; done $ I en `ps-ef | grep mysqld | awk '(print $ 2)'`; hacer `kill -9 $ i`; hacer
Thanks to Anthony Eden for the comment (below) to remove the dot in front. Gracias a Anthony Eden para el comentario (abajo) para eliminar el punto delante.
A simpler alternative is: Una alternativa es simple:
pkill mysqld pkill mysqld
This will kill the mysqld process. Esto matará la mysqld proceso. However the best way to stop (because it stops properly) is obviously: Sin embargo, la mejor manera de detener (porque se detiene correctamente) es, evidentemente:
/sbin/service mysqld stop / sbin / service mysqld stop
Filed under Filed under Database Base de datos , Linux , RDBMS , Web Hosting Web Hosting | |
| |
RSS 2.0 RSS 2,0 | |
Email this Article Enviar artículo
You may also like to read También puede leer |




January 8th, 2005 at 12:21 pm Enero 8, 2005 a las 12:21 pm
I suggest you remove the . Le sugiero que eliminar el archivo. in front of the first slash so that you can execute that command from anywhere, not just in the / directory. delante de la primera barra de modo que pueda ejecutar ese comando desde cualquier lugar, no sólo en el directorio /.
February 2nd, 2005 at 4:41 am 2 de Febrero, 2005 a las 4:41 am
what about ¿qué pasa con
# killall mysqld # Killall mysqld
February 2nd, 2005 at 5:20 am 2 de Febrero, 2005 a las 5:20 am
Ortwin,
Very true. Muy cierto. killall can be used instead of the awkward awk code. killall puede utilizarse en lugar de la incómoda awk código. I missed it because it is not on my Linux installation provided by my hosting provider. Me perdí, porque no es en mi instalación de Linux de mi proveedor de alojamiento.
Thanks for the tip. Gracias por la punta.
Angsuman
March 20th, 2005 at 8:31 pm 20 de marzo de 2005, a las 8:31 pm
very good muy bueno
March 31st, 2007 at 5:49 am 31 de marzo de 2007, a las 5:49 am
hai angsuman ..well the tip you provided to start the SQL server isnt working . hai angsuman .. así la punta que nos ha facilitado para iniciar el servidor SQL isn't trabajo.
April 2nd, 2007 at 7:48 am 2 de Abril, 2007 a las 7:48 am
You can also try these: También puede probar los siguientes:
service mysqld start servicio mysqld comienzo
service mysqld stop servicio mysqld stop
service mysqld restart reiniciar el servicio mysqld
October 18th, 2007 at 5:06 am 18 de octubre de 2007, a las 5:06 am
I tried the above one, but not able to stop! He intentado lo anterior, pero no puedo dejar de!
October 18th, 2007 at 1:14 pm 18 de octubre de 2007, a las 1:14 pm
To stop just use: Para detener sólo tiene que utilizar:
service mysqld stop servicio mysqld stop
November 27th, 2007 at 3:19 pm 27 de noviembre de 2007, a las 3:19 pm
I tried /sbin/service mysqld stop He intentado / sbin / service mysqld stop
But faled. Pero faled. got response “mysqld: unrecognized service obtuvo respuesta "mysqld: no reconocido servicio
“ "
November 27th, 2007 at 3:26 pm 27 de noviembre de 2007, a las 3:26 pm
Got the way. ¿Tienes el camino. “service mysql stop” worked fine. "Parar el servicio mysql" trabajan perfectamente.
But, please clarify the difference. Pero, por favor aclarar la diferencia. I don’t know what is the difference. No sé cuál es la diferencia.
November 27th, 2007 at 8:22 pm 27 de noviembre de 2007, a las 8:22 pm
No difference. No hay diferencia. The name of the mysqld executive may vary from one distribution to another and even between versions. El nombre de la mysqld ejecutivo puede variar de una distribución a otra e incluso entre versiones. On fedora core 6 it is mysqld. En Fedora Core 6 es mysqld. Which distro are you using? ¿Qué distro está usando?
November 29th, 2007 at 7:48 pm El 29 de noviembre de 2007, a las 7:48 pm
Worked like a charm, many thanks! Trabajó como un encanto, muchas gracias!
June 11th, 2008 at 5:20 am Junio 11, 2008 a 5:20 am
Really this should be titled How to Stop Mysql Server on Redhat/Fedora. Realmente esto debe ser titulado '¿Cómo parar el servidor MySQL en Redhat / Fedora. /sbin/service is a redhat-ism. / sbin / service es un redhat-ismo. Its basically a wrapper script around the init.d scripts. Su básicamente un script en torno a los init.d scripts. Debian/Ubuntu users, and other based on SysV style init scripts (most I think maybe not SuSE) can do the same thing by invoking /etc/init.d/mysql stop as root which is what /sbin/service does. Debian / Ubuntu usuarios, y otra basada en el estilo SysV init scripts (la mayoría creo que tal vez no SuSE) puede hacer la misma cosa de invocar el archivo / etc / init.d / mysql stop como raíz que es lo que / sbin / service hace.