Rechercher : dans
Par :

[Debian] impossibilité de démarrer mysql

Dernière réponse le 28 jui 2007 à 16:12:21 renolipus, le 28 jui 2007 à 10:19:34 
 Signaler ce message aux modérateurs

Salut à tous,

J'ai un problème avec mysql, celui refuse de démarrer, cela s'est produit du jour au lendemain, je n'ai rein fait de spécial à part installer quelques applis supplémentaires et mettre à jour ma distribution.

Je me demande si une autre application n'utiliserait pas le port de mysql, mais je ne sais pas comment le vérifier, netstat ne fournit pas ce renseignement.

J'ai également un second problème, en mode console, les flèches haut/bas ne me permettent plus de réafficher les commandes précédentes utilisées, c'est vraiment galère de devoir tout ressaisir à chaque fois.

Merci d'avance de votre aide.

Configuration: debian évidemment
firefox ça rox !

Meilleures réponses pour « [Debian] impossibilité de démarrer mysql » dans :
Installation rapide de LAMP (Apache+MySql+php) sous Linux VoirLAMP = Linux+Apache+MySql+Php. C'est le serveur web par excellence. L'ensemble est facile à installer. Installation rapide sudo aptitude install apache2 php5 mysql-server php5-mysql libapache2-mod-php5 Le mot de passe administrateur mySQL...
MySQL en console sur Windows : désactiver le bip d'erreur VoirLorsque vous utilisez MySQL en console sur Windows, chaque erreur provoque un bip. Pour le désactiver, il vous suffit simplement de rajouter le paramètre -b dans votre chaîne de connexion : mysql -b -h serveur -u utilisateur -p Vos voisins...

1

lami20j, le 28 jui 2007 à 10:30:11
  • +4

Salut,

affiche les messages d'erreurs après l'essaie de démarrage de mysql
affiche aussi

ps aux | grep mysql
netstat -lpn
lami20j

Répondre à lami20j

2

renolipus, le 28 jui 2007 à 10:44:50

Merci de ta réponse.

Je n'ai malheureusement pas de message d'erreur, juste

debian:/# /etc/init.d/mysql start
Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!


Pour la 1ère commande, j'obtiens
root      2500  0.0  0.1   2800  1344 ?        S    08:58   0:00 /bin/sh /usr/bin/mysqld_safe
mysql     2558  0.0  1.9 127224 17744 ?        Sl   08:58   0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
root      2559  0.0  0.0   1680   552 ?        S    08:58   0:00 logger -p daemon.err -t mysqld_safe -i -t mysqld
root     13314  0.0  0.1   4348  1308 pts/0    S    10:32   0:00 /bin/sh /usr/bin/mysqld_safe
mysql    13351  0.0  1.0  74804  9756 pts/0    Sl   10:32   0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
root     13352  0.0  0.0   3404   616 pts/0    S    10:32   0:00 logger -p daemon.err -t mysqld_safe -i -t mysqld
root     13530  0.0  0.0   3560   760 pts/0    R+   10:33   0:00 grep mysql


Quant au nestat, cela m'affiche
Connexions Internet actives (seulement serveurs)
Proto Recv-Q Send-Q Adresse locale          Adresse distante        Etat        PID/Program name   
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN     2558/mysqld         
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN     2155/portmap        
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN     3540/apache2        
tcp        0      0 0.0.0.0:47925           0.0.0.0:*               LISTEN     7093/rpc.statd      
tcp        0      0 127.0.0.1:8118          0.0.0.0:*               LISTEN     3247/privoxy        
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     4117/cupsd          
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN     3081/exim4          
tcp        0      0 127.0.0.1:9050          0.0.0.0:*               LISTEN     3253/tor            
udp        0      0 0.0.0.0:32769           0.0.0.0:*                          3301/avahi-daemon:  
udp        0      0 0.0.0.0:909             0.0.0.0:*                          7093/rpc.statd      
udp        0      0 0.0.0.0:68              0.0.0.0:*                          3421/dhclient       
udp        0      0 0.0.0.0:68              0.0.0.0:*                          2491/dhclient3      
udp        0      0 0.0.0.0:32839           0.0.0.0:*                          7093/rpc.statd      
udp        0      0 0.0.0.0:5353            0.0.0.0:*                          3301/avahi-daemon:  
udp        0      0 0.0.0.0:111             0.0.0.0:*                          2155/portmap        
udp        0      0 0.0.0.0:631             0.0.0.0:*                          4117/cupsd          
Sockets du domaine UNIX actives(seulement serveurs)
Proto RefCpt Indicatrs   Type       Etat          I-Node PID/Program name    Chemin
unix  2      [ ACC ]     STREAM     LISTENING     15708    4117/cupsd          /var/run/cups/cups.sock
unix  2      [ ACC ]     STREAM     LISTENING     7028     2558/mysqld         /var/run/mysqld/mysqld.sock
unix  2      [ ACC ]     STREAM     LISTENING     7482     2828/dbus-daemon    /var/run/dbus/system_bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     7204     2680/acpid          /var/run/acpid.socket
unix  2      [ ACC ]     STREAM     LISTENING     122310   13272/gconfd-2      /tmp/orbit-root/linc-33d8-0-1192c10d5d0e7
unix  2      [ ACC ]     STREAM     LISTENING     26394    4684/gnome-terminal /tmp/orbit-root/linc-124c-0-2375a62684740
unix  2      [ ACC ]     STREAM     LISTENING     26417    4688/bonobo-activat /tmp/orbit-root/linc-1250-0-5d272373ed9b5
unix  2      [ ACC ]     STREAM     LISTENING     8212     3301/avahi-daemon:  /var/run/avahi-daemon/socket
unix  2      [ ACC ]     STREAM     LISTENING     8240     3316/hald           @/var/run/hald/dbus-pQQGNQFjNW
unix  2      [ ACC ]     STREAM     LISTENING     9078     3419/X              /tmp/.X11-unix/X0
unix  2      [ ACC ]     STREAM     LISTENING     8243     3316/hald           @/var/run/hald/dbus-YDH1iHXGVb
unix  2      [ ACC ]     STREAM     LISTENING     9655     3648/gnome-keyring- /tmp/keyring-5lgXQD/socket
unix  2      [ ACC ]     STREAM     LISTENING     9597     3643/dbus-daemon    @/tmp/dbus-7qRmeFew36
unix  2      [ ACC ]     STREAM     LISTENING     9615     3645/gconfd-2       /tmp/orbit-renolipus/linc-e3d-0-282c2630e4274
unix  2      [ ACC ]     STREAM     LISTENING     9625     3591/gnome-session  /tmp/orbit-renolipus/linc-e07-0-1396d9bfff95
unix  2      [ ACC ]     STREAM     LISTENING     9674     3650/gnome-settings /tmp/orbit-renolipus/linc-e42-0-ad3b14bcd300
unix  2      [ ACC ]     STREAM     LISTENING     9734     3662/gnome-panel    /tmp/orbit-renolipus/linc-e4e-0-5662fa899f49
unix  2      [ ACC ]     STREAM     LISTENING     9770     3659/metacity       /tmp/orbit-renolipus/linc-e4b-0-56195d7ecc50e
unix  2      [ ACC ]     STREAM     LISTENING     9788     3664/nautilus       /tmp/orbit-renolipus/linc-e50-0-774d58782d6fb
unix  2      [ ACC ]     STREAM     LISTENING     9815     3673/gnome-vfs-daem /tmp/orbit-renolipus/linc-e59-0-7c4f421781a82
unix  2      [ ACC ]     STREAM     LISTENING     9835     3675/bluetooth-appl /tmp/orbit-renolipus/linc-e5b-0-1f3663c38d94e
unix  2      [ ACC ]     STREAM     LISTENING     9866     3681/update-notifie /tmp/orbit-renolipus/linc-e61-0-774d5878eaa7d
unix  2      [ ACC ]     STREAM     LISTENING     9874     3686/gnome-volume-m /tmp/orbit-renolipus/linc-e63-0-774d5878f03b0
unix  2      [ ACC ]     STREAM     LISTENING     9900     3684/nm-applet      /tmp/orbit-renolipus/linc-e64-0-59387f48207aa
unix  2      [ ACC ]     STREAM     LISTENING     9916     3687/gnome-power-ma /tmp/orbit-renolipus/linc-e62-0-59387f4852fe5
unix  2      [ ACC ]     STREAM     LISTENING     9029     3407/gdm            /tmp/.gdm_socket
unix  2      [ ACC ]     STREAM     LISTENING     9925     3670/bonobo-activat /tmp/orbit-renolipus/linc-e56-0-26ee64225e4b8
unix  2      [ ACC ]     STREAM     LISTENING     9974     3713/mapping-daemon /tmp/mapping-renolipus
unix  2      [ ACC ]     STREAM     LISTENING     9948     3685/gnome-cups-ico /tmp/orbit-renolipus/linc-e65-0-59387f4896da2
unix  2      [ ACC ]     STREAM     LISTENING     54156    10995/gnome-system- /tmp/gnome-system-monitor.renolipus.3134918617
unix  2      [ ACC ]     STREAM     LISTENING     9996     3718/geyes_applet2  /tmp/orbit-renolipus/linc-e86-0-7d0ccfcbd2ada
unix  2      [ ACC ]     STREAM     LISTENING     82370    12352/gedit         /tmp/gedit.renolipus.1755406317
unix  2      [ ACC ]     STREAM     LISTENING     10049    3723/multiload-appl /tmp/orbit-renolipus/linc-e8b-0-512aa9b8e481c
unix  2      [ ACC ]     STREAM     LISTENING     10503    3752/icedove-bin    /tmp/orbit-renolipus/linc-ea8-0-52a17ae0bccd2
unix  2      [ ACC ]     STREAM     LISTENING     10524    3771/gnome-screensa /tmp/orbit-renolipus/linc-eb9-0-35daacbe4c8ad
unix  2      [ ACC ]     STREAM     LISTENING     10948    3792/firefox-bin    /tmp/orbit-renolipus/linc-ed0-0-307949bd6c15f
unix  2      [ ACC ]     STREAM     LISTENING     16188    4258/gksu           /tmp/orbit-renolipus/linc-10a2-0-3675c359c7c88
unix  2      [ ACC ]     STREAM     LISTENING     26335    4673/gksu           /tmp/orbit-renolipus/linc-1241-0-7147242b4ac0a
unix  2      [ ACC ]     STREAM     LISTENING     47887    6710/notification-d /tmp/orbit-renolipus/linc-1a36-0-3e914ddb1a5a1
unix  2      [ ACC ]     STREAM     LISTENING     54163    10995/gnome-system- /tmp/orbit-renolipus/linc-2af3-0-50bccb3099c9a
unix  2      [ ACC ]     STREAM     LISTENING     60169    11140/gksu          /tmp/orbit-renolipus/linc-2b84-0-2221e1f2e5d5c
unix  2      [ ACC ]     STREAM     LISTENING     82366    12352/gedit         /tmp/orbit-renolipus/linc-3040-0-bbce758e1599
unix  2      [ ACC ]     STREAM     LISTENING     9646     3591/gnome-session  /tmp/.ICE-unix/3591
unix  2      [ ACC ]     STREAM     LISTENING     9586     3639/ssh-agent      /tmp/ssh-uqVtFK3591/agent.3591

Voilà.

Répondre à renolipus

3

lami20j, le 28 jui 2007 à 11:09:25

Les commandes m'affiche que le daemon mysql est en marche

essaie de te connecter

mysql -u root -p
lami20j

Répondre à lami20j

4

renolipus, le 28 jui 2007 à 13:03:25

Bah je ne comprend pas alors puisque

debian:/# /etc/init.d/mysql status
MySQL is stopped..

Et évidemment
debian:/# mysql -u root -pMON_PASS TEST
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

whereis me donne
debian:/# whereis mysql 
mysql: /usr/bin/mysql /etc/mysql /usr/X11R6/bin/mysql /usr/bin/X11/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz

C'est normal qu'il y ait un mysql dans /usr/X11/ ?

Et locate dans usr
debian:/# locate /usr/*mysql
/usr/bin/msql2mysql
/usr/bin/mysql
/usr/lib/perl5/auto/DBD/mysql
/usr/lib/perl5/DBD/mysql
/usr/share/doc/libapache-mod-acct-mysql
/usr/share/doc/php5-mysql
/usr/share/libapache-mod-acct-mysql
/usr/share/mysql
/usr/share/mysql-common/internal-use-only/_etc_init.d_mysql

Le msql2mysql correspond à quoi ?

Merci.

Répondre à renolipus

5

lami20j, le 28 jui 2007 à 13:14:43

Le msql2mysql correspond à quoi ?
msql2mysql

essaie de tuer les processus mysql et ensuite essai

/etc/init.d/mysql start

lami20j

Répondre à lami20j

6

renolipus, le 28 jui 2007 à 14:17:33

Ok pour le mysql2mysql.

Mais non, ça veut toujours pas :(

J'ai tenté un force-reload, et il me dit

Reloading MySQL database server: mysqld/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

Et dans /var/run/mysqld il n'y a rien...

J'ai vu ceci dans la doc
http://dev.mysql.com/doc/refman/5.0/fr/can-not-connect-to-se­rver.html
Et
http://dev.mysql.com/doc/refman/5.0/fr/problems-with-mysql-s­ock.html

Et le mysqld.sock n'existe pas ou plus dans mon /tmp :/
J'ai recherché tous les fichiers se terminant par .sock et aucun résultat pour mysql.

J'ai essayé de trouver un téléchargement pour ce fichier, mas je n'ai pas trouvé.

Si je fait une réinstallation de mysql, est-ce que mes bases de données seront supprimées ?

Répondre à renolipus

7

bob031, le 28 jui 2007 à 14:21:19

Salut

Si je fait une réinstallation de mysql, est-ce que mes bases de données seront supprimées ?

oui !

:-))

Répondre à bob031

8

lami20j, le 28 jui 2007 à 14:23:59

Affiche le fichier /etc/mysql/my.cnf

et je n'ai pas dit de faire reload, mais de tuer tous le processus mysql et ensuite de démarrer avec

/etc/init.d/mysql start
lami20j

Répondre à lami20j

9

renolipus, le 28 jui 2007 à 14:31:33

Oui, c'est ce que j'ai fait, mais de toute façon, il n'y aucun processus mysql qui tourne, enfin top ne m'en a pas montré, donc je vois pas ce que je peux tuer.

Ah un truc bizarre aussi, c'est que boot-up me dit lui que mysql tourne.

Pour mon my.cnf

#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
# 
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port		= 3306
socket		= /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket		= /var/run/mysqld/mysqld.sock
nice		= 0

[mysqld]
#
# * Basic Settings
#
user		= mysql
pid-file	= /var/run/mysqld/mysqld.pid
socket		= /var/run/mysqld/mysqld.sock
port		= 3306
basedir		= /usr
datadir		= /var/lib/mysql
tmpdir		= /tmp
language	= /usr/share/mysql/english
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address		= 127.0.0.1
#
# * Fine Tuning
#
key_buffer		= 16M
max_allowed_packet	= 16M
thread_stack		= 128K
thread_cache_size	= 8
#max_connections        = 100
#table_cache            = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit       = 1M
query_cache_size        = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
#log		= /var/log/mysql/mysql.log
#
# Error logging goes to syslog. This is a Debian improvement :)
#
# Here you can see queries with especially long duration
#log_slow_queries	= /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id		= 1
log_bin			= /var/log/mysql/mysql-bin.log
# WARNING: Using expire_logs_days without bin_log crashes the server! See README.Debian!
expire_logs_days	= 10
max_binlog_size         = 100M
#binlog_do_db		= include_database_name
#binlog_ignore_db	= include_database_name
#
# * BerkeleyDB
#
# Using BerkeleyDB is now discouraged as its support will cease in 5.1.12.
skip-bdb
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
# You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
#skip-innodb
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem



[mysqldump]
quick
quote-names
max_allowed_packet	= 16M

[mysql]
#no-auto-rehash	# faster start of mysql but no tab completition

[isamchk]
key_buffer		= 16M

#
# * NDB Cluster
#
# See /usr/share/doc/mysql-server-*/README.Debian for more information.
#
# The following configuration is read by the NDB Data Nodes (ndbd processes)
# not from the NDB Management Nodes (ndb_mgmd processes).
#
# [MYSQL_CLUSTER]
# ndb-connectstring=127.0.0.1


#
# * IMPORTANT: Additional settings that can override those from this file!
#
!includedir /etc/mysql/conf.d/

Répondre à renolipus

10

lami20j, le 28 jui 2007 à 14:35:51

Affiche encore une fois le résultat de la commande

ps aux | grep mysql
et je te dirai les processus que tu dois tuer lami20j

Répondre à lami20j

11

renolipus, le 28 jui 2007 à 14:38:45
  • +1

Voilà :)

root      2500  0.0  0.1   2800  1344 ?        S    08:58   0:00 /bin/sh /usr/bin/mysqld_safe
mysql     2558  0.0  1.9 127224 17744 ?        Sl   08:58   0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
root      2559  0.0  0.0   1680   552 ?        S    08:58   0:00 logger -p daemon.err -t mysqld_safe -i -t mysqld
root     21276  0.0  0.0   3556   756 pts/0    R+   14:35   0:00 grep mysql

Répondre à renolipus

12

lami20j, le 28 jui 2007 à 14:52:12

kill -9 2500
kill -9 2558
ps aux | grep mysql
lami20j

Répondre à lami20j

13

renolipus, le 28 jui 2007 à 16:00:15

Il me reste

root      4031  0.0  0.0   3556   756 pts/1    R+   15:56   0:00 grep mysql

Il faut le tuer aussi ?

Répondre à renolipus

14

lami20j, le 28 jui 2007 à 16:02:21
  • +1

Non
maintenant tape

/etc/init.d/mysql start 

et affiche ce qui ce passe lami20j

Répondre à lami20j

15

renolipus, le 28 jui 2007 à 16:05:01

Je comprend pas trop l'erreur qu'il me signale.

Starting MySQL database server: mysqld.
Checking for corrupt, not cleanly closed and upgrade needing tables..

Répondre à renolipus

16

lami20j, le 28 jui 2007 à 16:07:08

Pas grav le message
maintenant tape

mysql -u root -p
et affiche ce que tu vois lami20j

Répondre à lami20j

17

renolipus, le 28 jui 2007 à 16:11:24

Ca fonctionne :)

J'ai pas compris ce qu'il s'est passé, en tout cas, je vais vite exporter mes bdd.

Merci beaucoup de ton aide et surtout de ta patience.

Répondre à renolipus

18

 lami20j, le 28 jui 2007 à 16:12:21

De rien :-)

bonne continuation lami20j

Répondre à lami20j