How to start/stop MySQL server on Linux Come start / stop server MySQL su Linux
# To Start MySQL Server # Per iniziare a server MySQL
/sbin/service mysqld start / sbin / service mysqld inizio
# To Stop MySQL Server # Per interrompere server MySQL
/sbin/service mysqld stop / sbin / service mysqld stop
# To Restart MySQL Server # Per riavviare server MySQL
/sbin/service mysqld restart / sbin / service mysqld riavviare
And of course there is the brute force way to kill all the processes: E, naturalmente, vi è la forza bruta modo di uccidere tutti i processi:
$ for i in `ps -ef |grep mysqld |awk ‘{print $2}’`; do `kill -9 $i`; done $ Per i in `ps-ef | grep mysqld | awk '(print $ 2)'`; fare uccidere »-9 $ i`; fatto
Thanks to Anthony Eden for the comment (below) to remove the dot in front. Grazie a Anthony Eden per il commento (di seguito) per rimuovere il punto di fronte.
A simpler alternative is: Una alternativa è semplice:
pkill mysqld pkill mysqld
This will kill the mysqld process. Ciò uccidere il processo mysqld. However the best way to stop (because it stops properly) is obviously: Tuttavia il miglior modo per fermare (perché si arresta correttamente) è ovviamente:
/sbin/service mysqld stop / sbin / service mysqld stop
Filed under Elencato sotto Database Banca dati , Linux , RDBMS , Web Hosting Web Hosting | |
| |
RSS 2.0 RSS 2,0 | |
Email this Article Invia questo articolo
You may also like to read Si può anche leggere come |




January 8th, 2005 at 12:21 pm 8 gennaio 2005 a 12:21 pm
I suggest you remove the . Vi suggerisco di rimuovere. in front of the first slash so that you can execute that command from anywhere, not just in the / directory. di fronte alla prima barra in modo da poter eseguire il comando da qualsiasi luogo, non solo nella directory /.
February 2nd, 2005 at 4:41 am 2 febbraio 2005, alle 4:41 am
what about che dire
# killall mysqld # Killall mysqld
February 2nd, 2005 at 5:20 am 2 febbraio 2005, alle 5:20 am
Ortwin,
Very true. Molto vero. killall can be used instead of the awkward awk code. killall può essere usato al posto del codice awk scomodi. I missed it because it is not on my Linux installation provided by my hosting provider. Ho perso perché non è a mio installazione di Linux fornito dal mio fornitore di servizi di hosting.
Thanks for the tip. Grazie per il suggerimento.
Angsuman
March 20th, 2005 at 8:31 pm 20 marzo 2005 a 8:31 pm
very good molto buono
March 31st, 2007 at 5:49 am 31 marzo 2007 a 5:49 am
hai angsuman ..well the tip you provided to start the SQL server isnt working . angsuman hai .. e la punta che hai fornito per avviare il server SQL non è funzionante.
April 2nd, 2007 at 7:48 am 2 aprile 2007 alle 7:48 am
You can also try these: Potete anche provare questi:
service mysqld start servizio mysqld inizio
service mysqld stop servizio mysqld stop
service mysqld restart riavviare il servizio mysqld
October 18th, 2007 at 5:06 am 18 ottobre 2007 alle 5:06 am
I tried the above one, but not able to stop! Ho cercato di cui sopra, ma non in grado di fermare!
October 18th, 2007 at 1:14 pm 18 ottobre 2007 alle 1:14 pm
To stop just use: Per interrompere il solo uso:
service mysqld stop servizio mysqld stop
November 27th, 2007 at 3:19 pm 27 novembre 2007 alle 3:19 pm
I tried /sbin/service mysqld stop Ho provato / sbin / service mysqld stop
But faled. Ma OMESSO. got response “mysqld: unrecognized service ha ottenuto risposta "mysqld: servizio non riconosciuto
“ "
November 27th, 2007 at 3:26 pm 27 novembre 2007 alle 3:26 pm
Got the way. Ha ottenuto la strada. “service mysql stop” worked fine. "Servizio mysql stop" lavorato bene.
But, please clarify the difference. Ma, ti preghiamo di chiarire la differenza. I don’t know what is the difference. Non so che cosa è la differenza.
November 27th, 2007 at 8:22 pm 27 novembre 2007 alle 8:22 pm
No difference. Nessuna differenza. The name of the mysqld executive may vary from one distribution to another and even between versions. Il nome del mysqld esecutivo possono variare da una distribuzione all'altra e anche tra le versioni. On fedora core 6 it is mysqld. Su Fedora Core 6 è mysqld. Which distro are you using? Che distro stai usando?
November 29th, 2007 at 7:48 pm 29 novembre 2007 alle 7:48 pm
Worked like a charm, many thanks! Funzionato come un fascino, molte grazie!
June 11th, 2008 at 5:20 am 11 giugno 2008, 5:20 am
Really this should be titled How to Stop Mysql Server on Redhat/Fedora. Veramente questo dovrebbe essere intitolato Come fermare server MySQL su RedHat o Fedora. /sbin/service is a redhat-ism. / sbin / service è un redhat-ismo. Its basically a wrapper script around the init.d scripts. La sua fondamentalmente un wrapper attorno script init.d script. 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 utenti, e di altri sulla base di stile SysV init script (la maggior parte credo forse non SuSE) può fare la stessa cosa, invocando / etc / init.d / mysql stop come root, che è ciò che / sbin / servizio.