View previous topic :: View next topic |
Author |
Message |
superman2001 Apprentice


Joined: 09 Dec 2004 Posts: 157 Location: Tubize (Belgique)
|
Posted: Fri Feb 04, 2005 5:52 pm Post subject: [MySQL] Plantage au démarrage |
|
|
Bonsoir,
Après le démarrage de ma gentoo (noyau 2.6.10-gentoo-r6) et un accès à mon serveur MySQL, j'obtiens le message suivant :
Code: | ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) |
Et lors du démarrage, MySQL a l'air de démarrer normalement.
A part faire /etc/init.d/mysql zap et /etc/init.d/mysql start à chaque fois, que puis-je faire pour régler ce problème? J'ai déjà regardé dans les forums gentoo mais je n'ai rien trouvé qui puisse me satisfaire. J'ai également regardé dans le fichier /etc/init.d/mysql mais tout semble normal.
Merci d'avance.
@+,
Superman2001
Last edited by superman2001 on Fri Feb 04, 2005 10:07 pm; edited 1 time in total |
|
Back to top |
|
 |
kernelsensei Bodhisattva


Joined: 22 Feb 2004 Posts: 5619 Location: Woustviller/Moselle/FRANCE (49.07°N;7.02°E)
|
Posted: Fri Feb 04, 2005 6:16 pm Post subject: |
|
|
Salut,
Pourrais-tu changer ton titre comme indiqué ici [IMPORTANT] Comment se servir du forum !! stp !
Merci ! _________________ $ ruby -e'puts " .:@BFegiklnorst".unpack("x4ax7aaX6ax5aX15ax4aax6aaX7ax2aX5aX8 \
axaX3ax8aX4ax6aX3aX6ax3ax3aX9ax4ax2aX9axaX6ax3aX2ax4ax3aX4aXaX12ax10aaX7a").join' |
|
Back to top |
|
 |
superman2001 Apprentice


Joined: 09 Dec 2004 Posts: 157 Location: Tubize (Belgique)
|
Posted: Fri Feb 04, 2005 10:08 pm Post subject: |
|
|
Désolé. Voilà qui est rectifié. |
|
Back to top |
|
 |
superman2001 Apprentice


Joined: 09 Dec 2004 Posts: 157 Location: Tubize (Belgique)
|
Posted: Tue Feb 08, 2005 5:36 pm Post subject: |
|
|
Aucune réponse??? |
|
Back to top |
|
 |
Trevoke Advocate


Joined: 04 Sep 2004 Posts: 4099 Location: NY, NY
|
Posted: Tue Feb 08, 2005 5:48 pm Post subject: |
|
|
c'est dans quel runlevel? _________________ Votre moment detente
What is the nature of conflict? |
|
Back to top |
|
 |
manu.acl Guru


Joined: 29 Jan 2005 Posts: 426 Location: Paris
|
Posted: Tue Feb 08, 2005 10:09 pm Post subject: |
|
|
C'est le message d'erreur renvoyé quand on essaye de se connecter à une machine où il n'y a pas de mysql qui tourne...
Il y a peut être un parefeu qui bloque la connection...
Autrement regarde du coté des logs /var/log/mysql/ |
|
Back to top |
|
 |
superman2001 Apprentice


Joined: 09 Dec 2004 Posts: 157 Location: Tubize (Belgique)
|
Posted: Tue Feb 08, 2005 11:39 pm Post subject: |
|
|
Je suis dans le runlevel default, il y a bel et bien un serveur MySQL sur ma machine, je n'ai aucun firewall et dans /var/log/mysql/mysql.err, j'ai un grand nombre de fois une suite de messages de ce genre : Quote: | 050201 15:37:39 mysqld started
050201 15:37:40 Can't start server: Bind on TCP/IP port: Cannot assign requested address
050201 15:37:40 Do you already have another mysqld server running on port: 3306 ?
050201 15:37:40 Aborting
050201 15:37:40 /usr/sbin/mysqld: Shutdown Complete
050201 15:37:40 mysqld ended
050201 16:08:49 mysqld started
050201 23:55:23 mysqld ended
|
Si ça peut aider quelqu'un... |
|
Back to top |
|
 |
babykart Guru


Joined: 08 Oct 2004 Posts: 415
|
Posted: Tue Feb 08, 2005 11:46 pm Post subject: |
|
|
tu pourrais dire ce que donne la commande suivante
car on dirait que le port 3306 est déjà utilisé d'après les messages d'érreurs... _________________ >> Gentoo-FR <<
----- |
|
Back to top |
|
 |
superman2001 Apprentice


Joined: 09 Dec 2004 Posts: 157 Location: Tubize (Belgique)
|
Posted: Wed Feb 09, 2005 12:20 am Post subject: |
|
|
Voilà ce que donne netstat -l -p (du moins le dernier) : Quote: | Connexions Internet actives (seulement serveurs)
Proto Recv-Q Send-Q Adresse locale Adresse distante Etat PID/Program name
tcp 0 0 SuperPc.Maison:mysql *:* LISTEN 10298/mysqld
tcp 0 0 *:netbios-ssn *:* LISTEN 11123/smbd
tcp 0 0 *:10000 *:* LISTEN 11284/perl
tcp 0 0 *:ipp *:* LISTEN 10530/cupsd
tcp 0 0 *:microsoft-ds *:* LISTEN 11123/smbd
tcp 0 0 *:http *:* LISTEN 10475/apache2
udp 0 0 192.168.1.4:netbios-ns *:* 11126/nmbd
udp 0 0 *:netbios-ns *:* 11126/nmbd
udp 0 0 192.168.1.4:netbios-dgm *:* 11126/nmbd
udp 0 0 *:netbios-dgm *:* 11126/nmbd
udp 0 0 *:10000 *:* 11284/perl
udp 0 0 *:ipp *:* 10530/cupsd
udp 0 0 192.168.1.4:ntp *:* 10827/ntpd
udp 0 0 SuperPc.Maison:ntp *:* 10827/ntpd
udp 0 0 *:ntp *:* 10827/ntpd
udp 0 0 *:ntp *:* 10827/ntpd
Sockets du domaine UNIX actives(seulement serveurs)
Proto RefCpt Indicatrs Type Etat I-Node PID/Program name Chemin
unix 2 [ ACC ] STREAM LISTENING 10667 7835/acpid /var/run/acpid.socket
unix 2 [ ACC ] STREAM LISTENING 14262 10542/apache2 /var/run/cgisock
unix 2 [ ACC ] STREAM LISTENING 14036 10298/mysqld /var/run/mysqld/mysqld.sock
unix 2 [ ACC ] STREAM LISTENING 16004 11558/kdm /var/run/xdmctl/dmctl/socket
unix 2 [ ACC ] STREAM LISTENING 16012 11558/kdm /var/run/xdmctl/dmctl-:0/socket
unix 2 [ ACC ] STREAM LISTENING 17754 11961/gconfd-2 /tmp/orbit-pierre/linc-2eb9-0-44abe69dbe7de
unix 2 [ ACC ] STREAM LISTENING 17764 11956/mozilla-bin /tmp/orbit-pierre/linc-2eb4-0-55eec275d47df
unix 2 [ ACC ] STREAM LISTENING 16008 11566/X /tmp/.X11-unix/X0
unix 2 [ ACC ] STREAM LISTENING 16366 11738/dcopserver [k /tmp/.ICE-unix/dcop11738-1107908165
unix 2 [ ACC ] STREAM LISTENING 16519 11759/artsd /tmp/mcop-pierre/SuperPc_Maison-2def-4209564c
unix 2 [ ACC ] STREAM LISTENING 16574 11764/ksmserver [kd /tmp/.ICE-unix/11764
unix 2 [ ACC ] STREAM LISTENING 16354 11735/kdeinit Runni /home/pierre/.kde3.3/socket-SuperPc/kdeinit__0
unix 2 [ ACC ] STREAM LISTENING 16356 11735/kdeinit Runni /home/pierre/.kde3.3/socket-SuperPc/kdeinit-:0
unix 2 [ ACC ] STREAM LISTENING 16387 11740/klauncher [kd /home/pierre/.kde3.3/socket-SuperPc/klauncherX81ffc.slave-socket
|
|
|
Back to top |
|
 |
babykart Guru


Joined: 08 Oct 2004 Posts: 415
|
Posted: Wed Feb 09, 2005 12:34 am Post subject: |
|
|
tiens y a un truc de louche:
Code: | tcp 0 0 SuperPc.Maison:mysql *:* LISTEN 10298/mysqld
unix 2 [ ACC ] STREAM LISTENING 14036 10298/mysqld /var/run/mysqld/mysqld.sock |
donc il y a bien un mysql qui tourne, alors voilà ce que je tenterai:
ensuite relance mysql mais avec la commande des rc-scripts
Code: | # /etc/init.d/mysql start |
et tiens nous au jus de ce que cela donne...
[edit]
tu n'aurais pas modifier le fichier /etc/mysql/my.cnf car ton mysql est en listen sur une autre adresse que localhost qui est par défaut normallement: ce qui expliquerait, assez logiquement le
Code: | ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) |
donc ma solution du dessus ne correspond pas puisque ton mysql tourne et c'est normal, par contre rétabli la ligne original bind-address = 127.0.0.1 et restart mysql toujours par les commandes des rc-scripts...
[/edit] _________________ >> Gentoo-FR <<
----- |
|
Back to top |
|
 |
superman2001 Apprentice


Joined: 09 Dec 2004 Posts: 157 Location: Tubize (Belgique)
|
Posted: Wed Feb 09, 2005 11:37 am Post subject: |
|
|
Le killall mysql ne donne rien puisque mysql ne tourne pas.
/etc/init.d/mysql start me dit que mysql tourne déjà.
Je n'ai pas changé le contenu de /etc/mysql/my.cnf.
Voici son contenu : Code: | # /etc/mysql/my.cnf: The global mysql configuration file.
# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/my.cnf-4.0.14-r1,v 1.2 2004/07/18 02:47:43 dragonheart Exp $
#
# This file can be simultaneously placed in three places:
# 1. /etc/mysql/my.cnf to set global options.
# 2. /var/lib/mysql/my.cnf to set server-specific options.
# 3. ~/.my.cnf to set user-specific options.
#
# One can use all long options that the program supports.
# Run the program with --help to get a list of them.
#
# The following values assume you have at least 32M RAM!
[client]
#password = my_password
port = 3306
socket = /var/run/mysqld/mysqld.sock
[safe_mysqld]
err-log = /var/log/mysql/mysql.err
[mysqld]
skip-innodb
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
log-error = /var/log/mysql/mysqld.err
# If set, mysql logs all queries(general query log). This will be deprecated in
# 5.0. This logs all queries, even error queries and is slow.
# log = /var/log/mysql/mysql.log
#
# If you really need logging, use rather binary logging. Especially when doing
# replication. Read
# file:/usr/share/doc/mysql-*/manual.html.gz#Replication
# You can use PURGE MASTER LOGS TO '$hostname-bin.010' to get rid of old logs
# from $hostname-bin.01 up to $hostname-bin.09 while the slave server is
# running.
# Before doing that, check which logfile slave curently uses by running
# mysql> SHOW SLAVE STATUS
# To list logfiles on master do:
# mysql> SHOW MASTER LOGS
# Then use PURGE for those not needed anymore only! Never remove the files
# manually!
#
# Also consult RESET MASTER and RESET SLAVE commands before doing any changes
# mysql> RESET MASTER - Deletes all binary logs listed in the index
# file, resetting the binlog index file to be empty.
# mysql> RESET SLAVE - Makes the slave forget its replication position in
# the master logs.
# mysql> SET SQL_LOG_BIN=0 - this turns off logging (execute on MASTER only)
# mysql> SET SQL_LOG_BIN=1 - this turns on logging (execute on MASTER only)
#
# log-bin
# set-variable = binlog-do-db=non_existant
# set-variable = binlog-ignore-db=database_name
#
# server-id has to unique for each master or slave in your network,
# lets use last number from IP address
# server-id = 207
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/french
skip-locking
set-variable = key_buffer=16M
set-variable = max_allowed_packet=1M
set-variable = thread_stack=128K
# keep secure by default!
bind-address = 127.0.0.1
port = 3306
# this can make it even more secure:
#skip-networking
[mysqldump]
quick
set-variable = max_allowed_packet=1M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
set-variable = key_buffer=16M |
|
|
Back to top |
|
 |
babykart Guru


Joined: 08 Oct 2004 Posts: 415
|
Posted: Wed Feb 09, 2005 12:20 pm Post subject: |
|
|
et quand tu fais
ou
il n'y a aucun mysql qui traine?
s'il n'y en a pas alors
Code: | # rm -f /var/run/mysqld/mysqld.* |
et ensuite relance mysql _________________ >> Gentoo-FR <<
----- |
|
Back to top |
|
 |
superman2001 Apprentice


Joined: 09 Dec 2004 Posts: 157 Location: Tubize (Belgique)
|
Posted: Wed Feb 09, 2005 12:36 pm Post subject: |
|
|
Le top et le ps -ef n'indiquent aucun mysql(d) en cours d'exécution.
/var/run/mysqld est vide.
/etc/init.d/mysql restart ne fonctionne pas.
Bref, ce n'est pas ça. |
|
Back to top |
|
 |
babykart Guru


Joined: 08 Oct 2004 Posts: 415
|
Posted: Wed Feb 09, 2005 1:02 pm Post subject: |
|
|
désolé mais là je ne vois plus...
pour moi l'installation de mysql a toujours été d'une simplicité enfantine...
re-emerge le au cas ou... _________________ >> Gentoo-FR <<
----- |
|
Back to top |
|
 |
superman2001 Apprentice


Joined: 09 Dec 2004 Posts: 157 Location: Tubize (Belgique)
|
Posted: Wed Feb 09, 2005 3:17 pm Post subject: |
|
|
Le reemerge de mysql ne change rien.
Je vais essayer de le virer complètement puis de l'émerger.
--edit--
La suppression et l'émerge de mysql ne change rien non plus. snif ;-(((
--/edit-- |
|
Back to top |
|
 |
Elianora la blanche Tux's lil' helper


Joined: 22 Dec 2004 Posts: 78 Location: Brocéliande, Bretagne
|
Posted: Sun Feb 13, 2005 8:26 pm Post subject: |
|
|
j'ai le même problème, j'ai déjà reemergé 2 fois :s
je suis coincée là je ne sais plus quoi faire (a part balancer l'ordi par la fenetre mais mon pere risque de ne pas apprecier)
si quelqu'un a une idée _________________ Where once was light,
Now darkness falls;
Where once was love,
Love is no more;
Don't say "Goodbye",
Don't say: "I didn't try..." |
|
Back to top |
|
 |
Prosper4tie Tux's lil' helper

Joined: 02 Apr 2004 Posts: 94 Location: France (74)
|
Posted: Mon Feb 14, 2005 9:12 am Post subject: |
|
|
J'ai déja eu ce problème sous slackware.
De mémoire, il me semble que mysql tourne avec les droits de l'utilisteur mysql.
Il faut donc le créer et assigner les droits mysql au répertoire /var/lib/mysql.
Donc il faut peut etre verifier l'utilisateur proprio de mysql et les droits qui vont avec.
Sans conviction. |
|
Back to top |
|
 |
Elianora la blanche Tux's lil' helper


Joined: 22 Dec 2004 Posts: 78 Location: Brocéliande, Bretagne
|
Posted: Mon Feb 14, 2005 7:07 pm Post subject: |
|
|
étrange ce matin au reboot, ça fonctionne
décidemment les voies de l'informatique sont impénétrables...  _________________ Where once was light,
Now darkness falls;
Where once was love,
Love is no more;
Don't say "Goodbye",
Don't say: "I didn't try..." |
|
Back to top |
|
 |
superman2001 Apprentice


Joined: 09 Dec 2004 Posts: 157 Location: Tubize (Belgique)
|
Posted: Mon Feb 14, 2005 7:46 pm Post subject: |
|
|
Voilà les droits du dossier /var/lib/mysql :
Code: | # ls -l /var/lib/
drwxr-x--- 6 mysql mysql 4096 fév 14 20:37 mysql |
Ils sont donc corrects.
Voici aussi l'entrée de /etc/passwd concernant l'utilisateur mysql :
Code: | mysql:x:60:60:mysql:/var/lib/mysql:/bin/false |
et l'entrée de /etc/group concernant le groupe mysql :
De temps en temps, il se met en route convenablement mais le plus souvent , il n'a pas l'air de démarrer. |
|
Back to top |
|
 |
Prosper4tie Tux's lil' helper

Joined: 02 Apr 2004 Posts: 94 Location: France (74)
|
Posted: Tue Feb 15, 2005 7:45 am Post subject: |
|
|
donc a priori c''est pas des problèmes de droits.
Vérifie juste que en faisant un "top" que c'est bien le user mysql qui lance le daemon mysql |
|
Back to top |
|
 |
superman2001 Apprentice


Joined: 09 Dec 2004 Posts: 157 Location: Tubize (Belgique)
|
Posted: Tue Feb 15, 2005 12:36 pm Post subject: |
|
|
Voici ce que me donne la commande top à propos de mysql quand je fais zap et start:
Code: | 13110 root 16 0 2308 1160 992 S 0.0 0.2 0:00.00 mysqld_safe
13145 mysql 17 0 22868 2680 2092 S 0.0 0.5 0:00.00 mysqld
13146 mysql 16 0 22868 2680 2092 S 0.0 0.5 0:00.00 mysqld
13147 mysql 20 0 22868 2680 2092 S 0.0 0.5 0:00.00 mysqld |
|
|
Back to top |
|
 |
rg421 Apprentice

Joined: 07 Dec 2004 Posts: 192 Location: Strasbourg
|
Posted: Tue Feb 15, 2005 12:52 pm Post subject: |
|
|
Quote: | donc a priori c''est pas des problèmes de droits. | Sur les dossiers, en tous cas...
Essaie de lancer MySQL avec la commandeC'est le seule manière de s'assurer que mysqld tournera bien sous l'identité mysql:mysql.
--
Renaud |
|
Back to top |
|
 |
superman2001 Apprentice


Joined: 09 Dec 2004 Posts: 157 Location: Tubize (Belgique)
|
Posted: Tue Feb 15, 2005 2:14 pm Post subject: |
|
|
Top me donne la même chose dans ce cas. |
|
Back to top |
|
 |
|