How to start/stop MySQL server on Linux Comment démarrer / arrêter le serveur MySQL sous Linux
# To Start MySQL Server # Pour démarrer le serveur MySQL
/sbin/service mysqld start / sbin / service mysqld start
# To Stop MySQL Server # Pour arrêter le serveur MySQL
/sbin/service mysqld stop / sbin / service mysqld stop
# To Restart MySQL Server # Pour redémarrer le serveur MySQL
/sbin/service mysqld restart / sbin / service mysqld restart
And of course there is the brute force way to kill all the processes: Et il ya bien sûr la force brutale façon de tuer tous les processus:
$ for i in `ps -ef |grep mysqld |awk ‘{print $2}’`; do `kill -9 $i`; done $ For i in `ps-ef | grep mysqld | awk '(print $ 2)'`; faire tuer »-9 $ i» fait
Thanks to Anthony Eden for the comment (below) to remove the dot in front. Merci à Anthony Eden pour le commentaire (ci-dessous) pour supprimer le point en face.
A simpler alternative is: Une alternative est simple:
pkill mysqld pkill mysqld
This will kill the mysqld process. Cela tuera les processus mysqld. However the best way to stop (because it stops properly) is obviously: Toutefois, le meilleur moyen de mettre un terme (car il s'arrête correctement) est à l'évidence:
/sbin/service mysqld stop / sbin / service mysqld stop
Filed under Classé sous Database Base de données , Linux , RDBMS SGBDR , Web Hosting Web Hosting | |
| |
RSS 2.0 RSS 2,0 | |
Email this Article Envoyer cet article
You may also like to read Vous mai également à lire |




January 8th, 2005 at 12:21 pm Janvier 8th, 2005 at 12:21 pm
I suggest you remove the . Je vous suggère de supprimer les fichiers. in front of the first slash so that you can execute that command from anywhere, not just in the / directory. en face de la première barre oblique pour que vous puissiez exécuter cette commande de n'importe où, pas seulement dans le fichier / répertoire.
February 2nd, 2005 at 4:41 am 2 février 2005 à 4:41 am
what about qu'en est-il de
# killall mysqld # Killall mysqld
February 2nd, 2005 at 5:20 am 2 février 2005 à 5:20 am
Ortwin,
Very true. Très vrai. killall can be used instead of the awkward awk code. killall peut être utilisé en lieu et place du code awk maladroite. I missed it because it is not on my Linux installation provided by my hosting provider. J'ai manqué parce qu'il n'est pas sur mon installation de Linux fourni par mon fournisseur d'hébergement.
Thanks for the tip. Merci pour l'astuce.
Angsuman
March 20th, 2005 at 8:31 pm Mars 20th, 2005 at 8:31 pm
very good très bon
March 31st, 2007 at 5:49 am 31 mars 2007 à 5:49 am
hai angsuman ..well the tip you provided to start the SQL server isnt working . Haï angsuman .. bien la pointe que vous avez fournie pour démarrer le serveur SQL n'est pas de travail.
April 2nd, 2007 at 7:48 am 2 avril 2007 à 7:48 am
You can also try these: Vous pouvez aussi essayer ces:
service mysqld start service mysqld start
service mysqld stop service mysqld stop
service mysqld restart service mysqld restart
October 18th, 2007 at 5:06 am Octobre 18th, 2007 at 5:06 am
I tried the above one, but not able to stop! J'ai essayé l'une au-dessus, mais pas en mesure d'arrêter!
October 18th, 2007 at 1:14 pm Octobre 18th, 2007 at 1:14 pm
To stop just use: Pour arrêter il suffit d'utiliser:
service mysqld stop service mysqld stop
November 27th, 2007 at 3:19 pm Novembre 27th, 2007 at 3:19 pm
I tried /sbin/service mysqld stop J'ai essayé / sbin / service mysqld stop
But faled. Mais faled. got response “mysqld: unrecognized service obtenu de réponse "mysqld: service non
“ "
November 27th, 2007 at 3:26 pm Novembre 27th, 2007 at 3:26 pm
Got the way. Vous avez la voie. “service mysql stop” worked fine. "Service mysql stop" fonctionnait bien.
But, please clarify the difference. Mais, s’il vous plaît clarifier la différence. I don’t know what is the difference. Je ne sais pas quelle est la différence.
November 27th, 2007 at 8:22 pm Novembre 27th, 2007 at 8:22 pm
No difference. Aucune différence. The name of the mysqld executive may vary from one distribution to another and even between versions. Le nom de l'exécutif mysqld mai varier d'une distribution à l'autre et même entre les versions. On fedora core 6 it is mysqld. Le Fedora Core 6, il est mysqld. Which distro are you using? Quelle distribution utilisez-vous?
November 29th, 2007 at 7:48 pm Novembre 29th, 2007 at 7:48 pm
Worked like a charm, many thanks! A travaillé comme un charme, merci beaucoup!
June 11th, 2008 at 5:20 am Juin 11, 2008 à 5:20 am
Really this should be titled How to Stop Mysql Server on Redhat/Fedora. Vraiment ce devrait être intitulé How To Stop serveur MySQL sur Redhat / Fedora. /sbin/service is a redhat-ism. / sbin / service est une redhat-isme. Its basically a wrapper script around the init.d scripts. Son principe d'une enveloppe autour du script scripts init.d. 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 utilisateurs, et d'autres basé sur le style de SysV init scripts (plus je pense que peut-être pas SuSE) peut faire la même chose en invoquant le fichier / etc / init.d / mysql stop en tant que root et c'est ce que / sbin / service ne.