MySQL Forums
Forum List  »  French

Mysql ne veut plus démarrer après un restart (mysql.sock)
Posted by: Arno Gastrik
Date: December 29, 2011 04:20AM

Bonjour,

J'ai installé sur un serveur (RHEL5) les packages Apache et MySQL(-server) en utilisant yum.
Tout marche bien au début, puis sans modification de la configuration, après un
/etc/rc.d/init.d/mysqld restart, impossible de rédémarrer le service :

<code>
[root@XXX ~]# /etc/init.d/mysqld restart
Arrêt de mysqld : [ OK ]
MySQL Daemon failed to start.
Démarrage de mysqld : [ÃCHOUÃ</code>


Je fouille un peu, et un erreur un peu plus précise se dessine :

<code>[root@XXX ~]# /usr/bin/mysql_secure_installation
In order to log into MySQL to secure it, we'll need the current
password for the root user. If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Enter current password for root (enter for none):
Aborting!</code>

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) : je regarde donc si le fichier existe :

<code>[root@NDOBSSWV01 mysql]# ls -l /var/lib/mysql/mysql.sock
ls: impossible d'accéder à /var/lib/mysql/mysql.sock: Aucun fichier ou dossier de ce type
</code>


J'ai rien à perdre, donc je désinstalle puis réinstalle mysql et mysql-server (yum remove puis yum install)

Même problème.
Le user mysql existe bien
<code>[root@XXX ~]#cat /etc/passwd
mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash</code>
et a bien les droit sur les diverses arborescence (mysql:root)

Voici mon /etc/my.cnf si besoin :
<code>[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid</code>

et la ligne iptables avec le port de mysql :
[root@XXX ~]# vim /etc/sysconfig/iptables
= > -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
[root@XXX ~]# /etc/rc.d/init.d/iptables restart
iptables : Suppression des règles du pare-feu : [ OK ]
iptables : Configuration des chaînes sur la politique ACC[ OK ]ilter
iptables : Déchargement des modules : [ OK ]
iptables : Application des règles du pare-feu : [ OK ]
Donc voila, ça fait deux jours que j'enchaine les install/remove de mysql en suivant les "solutions" trouvé sur google à "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)" ou "missing file '/var/lib/mysql/mysql.sock'", mais rien...

Pour rappel, je ne peux pas démarrer le service mysql et aucun processus mysql n'est lancé (éventuel soucis de conflit)

<code>[root@NDOBSSWV01 mysql]# ps -aux |grep mysql
root 7784 0.0 0.0 105220 876 pts/0 S+ 10:55 0:00 grep mysql</code>


Si quelqu'un à une piste de réponse... :)

Cordialement

Options: ReplyQuote


Subject
Views
Written By
Posted
Mysql ne veut plus démarrer après un restart (mysql.sock)
4532
December 29, 2011 04:20AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.