Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 13/01/2010, à 18:14

waielbi

[Résolu] Mysql n'a plus de socket !

Help ! J'ai beau chercher sur ce forum et ailleurs, je ne trouve pas comment résoudre ce problème.

Ce lamp récent a fonctionné mais depuis quelques temps, je ne sais pas pas bien depuis quand, mysql ne démarre plus et un restart renvoie "fail".

Voici le syslog (une partie, j'ai viré les gros paquets qui ne concernent pas mysql)

Jan 13 15:30:17 hmai-laptop /etc/init.d/mysql[1984]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Jan 13 15:30:17 hmai-laptop /etc/init.d/mysql[1984]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed
Jan 13 15:30:17 hmai-laptop /etc/init.d/mysql[1984]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Jan 13 15:30:17 hmai-laptop /etc/init.d/mysql[1984]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Jan 13 15:30:17 hmai-laptop /etc/init.d/mysql[1984]: 

[plus loin...]

Jan 13 15:34:43 hmai-laptop kernel: [  296.318408] type=1503 audit(1263393283.114:42): operation="open" pid=2815 parent=2814 profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:34:43 hmai-laptop kernel: [  296.381074] type=1503 audit(1263393283.174:43): operation="open" pid=2836 parent=2835 profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:34:43 hmai-laptop mysqld_safe: Starting mysqld daemon with databases from /var/lib/mysql
Jan 13 15:34:43 hmai-laptop kernel: [  296.546094] type=1503 audit(1263393283.342:44): operation="open" pid=2950 parent=2842 profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:34:43 hmai-laptop mysqld: 100113 15:34:43 [Warning] Can't create test file /var/lib/mysql/hmai-laptop.lower-test
Jan 13 15:34:43 hmai-laptop mysqld: 100113 15:34:43 [Warning] Can't create test file /var/lib/mysql/hmai-laptop.lower-test
Jan 13 15:34:43 hmai-laptop mysqld: 100113 15:34:43 [Warning] One can only use the --user switch if running as root
Jan 13 15:34:43 hmai-laptop mysqld: 
Jan 13 15:34:43 hmai-laptop mysqld: 100113 15:34:43 [Note] Plugin 'FEDERATED' is disabled.
Jan 13 15:34:43 hmai-laptop mysqld: /usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist
Jan 13 15:34:43 hmai-laptop mysqld: 100113 15:34:43 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
Jan 13 15:34:43 hmai-laptop mysqld: 100113 15:34:43  InnoDB: Operating system error number 13 in a file operation.
Jan 13 15:34:43 hmai-laptop mysqld: InnoDB: The error means mysqld does not have the access rights to
Jan 13 15:34:43 hmai-laptop mysqld: InnoDB: the directory.
Jan 13 15:34:43 hmai-laptop mysqld: InnoDB: File name ./ibdata1
Jan 13 15:34:43 hmai-laptop mysqld: InnoDB: File operation call: 'open'.
Jan 13 15:34:43 hmai-laptop mysqld: InnoDB: Cannot continue operation.
Jan 13 15:34:43 hmai-laptop mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended
Jan 13 15:34:44 hmai-laptop kernel: [  297.399628] type=1503 audit(1263393284.191:45): operation="open" pid=2962 parent=2961 profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:34:45 hmai-laptop ebeam-server: HASP driver not installed
Jan 13 15:34:45 hmai-laptop kernel: [  298.421147] type=1503 audit(1263393285.211:46): operation="open" pid=2972 parent=2971 profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:34:46 hmai-laptop kernel: [  299.439271] type=1503 audit(1263393286.230:47): operation="open" pid=2982 parent=2981 profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:34:47 hmai-laptop kernel: [  300.460311] type=1503 audit(1263393287.252:48): operation="open" pid=2992 parent=2991 profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:34:48 hmai-laptop kernel: [  301.481349] type=1503 audit(1263393288.282:49): operation="open" pid=3002 parent=3001 profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:34:49 hmai-laptop ebeam-server: HASP driver not installed
Jan 13 15:34:49 hmai-laptop kernel: [  302.499553] type=1503 audit(1263393289.302:50): operation="open" pid=3012 parent=3011 profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:34:50 hmai-laptop kernel: [  303.517579] type=1503 audit(1263393290.312:51): operation="open" pid=3022 parent=3021 profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:34:51 hmai-laptop kernel: [  304.537389] type=1503 audit(1263393291.340:52): operation="open" pid=3032 parent=3031 profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:34:52 hmai-laptop kernel: [  305.555567] type=1503 audit(1263393292.351:53): operation="open" pid=3042 parent=3041 profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:34:53 hmai-laptop ebeam-server: HASP driver not installed
Jan 13 15:34:53 hmai-laptop kernel: [  306.573755] type=1503 audit(1263393293.372:54): operation="open" pid=3052 parent=3051 profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:34:54 hmai-laptop kernel: [  307.592081] type=1503 audit(1263393294.392:55): operation="open" pid=3062 parent=3061 profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:34:55 hmai-laptop kernel: [  308.618166] type=1503 audit(1263393295.420:56): operation="open" pid=3072 parent=3071 profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:34:56 hmai-laptop kernel: [  309.636223] type=1503 audit(1263393296.440:57): operation="open" pid=3082 parent=3081 profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:34:57 hmai-laptop ebeam-server: HASP driver not installed
Jan 13 15:34:57 hmai-laptop kernel: [  310.657651] type=1503 audit(1263393297.461:58): operation="open" pid=3092 parent=3091 profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:34:57 hmai-laptop /etc/init.d/mysql[3108]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Jan 13 15:34:57 hmai-laptop /etc/init.d/mysql[3108]: Could not open required defaults file: /etc/mysql/debian.cnf
Jan 13 15:34:57 hmai-laptop /etc/init.d/mysql[3108]: Fatal error in defaults handling. Program aborted
Jan 13 15:34:57 hmai-laptop /etc/init.d/mysql[3108]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed
Jan 13 15:34:57 hmai-laptop /etc/init.d/mysql[3108]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Jan 13 15:34:57 hmai-laptop /etc/init.d/mysql[3108]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Jan 13 15:34:57 hmai-laptop /etc/init.d/mysql[3108]: 
Jan 13 15:34:57 hmai-laptop kernel: [  310.673499] type=1503 audit(1263393297.482:59): operation="open" pid=3101 parent=3100 profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r" fsuid=1000 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:35:01 hmai-laptop ebeam-server: HASP driver not installed
Jan 13 15:35:18 hmai-laptop ebeam-server: last message repeated 4 times
Jan 13 15:35:18 hmai-laptop kernel: [  331.442119] type=1503 audit(1263393318.270:60): operation="open" pid=3120 parent=3119 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:35:18 hmai-laptop kernel: [  331.482528] type=1503 audit(1263393318.303:61): operation="open" pid=3141 parent=3140 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:35:18 hmai-laptop mysqld_safe: Starting mysqld daemon with databases from /var/lib/mysql
Jan 13 15:35:18 hmai-laptop kernel: [  331.643426] type=1503 audit(1263393318.473:62): operation="open" pid=3255 parent=3147 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:35:18 hmai-laptop mysqld: 100113 15:35:18 [Note] Plugin 'FEDERATED' is disabled.
Jan 13 15:35:18 hmai-laptop mysqld: /usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist
Jan 13 15:35:18 hmai-laptop mysqld: 100113 15:35:18 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
Jan 13 15:35:18 hmai-laptop mysqld: 100113 15:35:18  InnoDB: Started; log sequence number 0 44243
Jan 13 15:35:18 hmai-laptop mysqld: 100113 15:35:18 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
Jan 13 15:35:18 hmai-laptop mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended
Jan 13 15:35:19 hmai-laptop kernel: [  332.501102] type=1503 audit(1263393319.320:63): operation="open" pid=3272 parent=3271 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:35:20 hmai-laptop kernel: [  333.520885] type=1503 audit(1263393320.352:64): operation="open" pid=3282 parent=3281 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:35:21 hmai-laptop kernel: [  334.538866] type=1503 audit(1263393321.361:65): operation="open" pid=3292 parent=3291 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:35:21 hmai-laptop ebeam-server: HASP driver not installed
Jan 13 15:35:22 hmai-laptop kernel: [  335.558355] type=1503 audit(1263393322.390:66): operation="open" pid=3302 parent=3301 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:35:23 hmai-laptop kernel: [  336.576715] type=1503 audit(1263393323.410:67): operation="open" pid=3312 parent=3311 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:35:24 hmai-laptop kernel: [  337.594332] type=1503 audit(1263393324.420:68): operation="open" pid=3322 parent=3321 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:35:25 hmai-laptop kernel: [  338.612439] type=1503 audit(1263393325.441:69): operation="open" pid=3332 parent=3331 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:35:25 hmai-laptop ebeam-server: HASP driver not installed
Jan 13 15:35:26 hmai-laptop kernel: [  339.633374] type=1503 audit(1263393326.470:70): operation="open" pid=3342 parent=3341 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:35:27 hmai-laptop kernel: [  340.651662] type=1503 audit(1263393327.481:71): operation="open" pid=3352 parent=3351 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:35:28 hmai-laptop kernel: [  341.669782] type=1503 audit(1263393328.501:72): operation="open" pid=3362 parent=3361 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:35:29 hmai-laptop ebeam-server: HASP driver not installed
Jan 13 15:35:29 hmai-laptop kernel: [  342.687705] type=1503 audit(1263393329.520:73): operation="open" pid=3372 parent=3371 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:35:30 hmai-laptop kernel: [  343.708999] type=1503 audit(1263393330.541:74): operation="open" pid=3382 parent=3381 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:35:31 hmai-laptop kernel: [  344.729938] type=1503 audit(1263393331.563:75): operation="open" pid=3392 parent=3391 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:35:32 hmai-laptop kernel: [  345.747964] type=1503 audit(1263393332.590:76): operation="open" pid=3402 parent=3401 profile="/usr/sbin/mysqld" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/system/cpu/"
Jan 13 15:35:32 hmai-laptop /etc/init.d/mysql[3418]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Jan 13 15:35:32 hmai-laptop /etc/init.d/mysql[3418]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed
Jan 13 15:35:32 hmai-laptop /etc/init.d/mysql[3418]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Jan 13 15:35:32 hmai-laptop /etc/init.d/mysql[3418]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Jan 13 15:35:32 hmai-laptop /etc/init.d/mysql[3418]:

J'ai donc essayé mysql_upgrade

hmai@hmai-laptop:~$ sudo 
[sudo] password for hmai: 
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/var/run/mysqld/mysqld.sock' 
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed

Si je cherche le fameux socket :

hmai@hmai-laptop:~$ sudo find / -name mysqld.sock

Je n'ai rien et si je me rends à /var/run/mysqld le dossier est vide.

J'ai une ubuntu 9.10 64bits.
J'ai fait un
sudo apt-get remove mysql-server puis install, rien de mieux.
J'ai essayé de savoir si le port 3306 était occupé avec netstat -a (c'est comme ça qu'il faut faire ?) je n'ai rien à 3306.

Je ne sais plus quoi chercher ni essayer.

Dernière modification par waielbi (Le 13/01/2010, à 23:11)

Hors ligne

#2 Le 13/01/2010, à 18:22

Hermes le Messager

Re : [Résolu] Mysql n'a plus de socket !

Mets lui des collants.

Je -----> []

Hors ligne

#3 Le 13/01/2010, à 18:27

waielbi

Re : [Résolu] Mysql n'a plus de socket !

Arf, bon je l'ai cherché wink

Allez, je veux croire qu'un crack de Mysql va trouver mon problème trivial. Je ne suis pas du tout expert, du coup je ne vois plus où chercher...

----
Edit

En cherchant plus loin, j'ai désinstallé avec remove --purge mysql-server, mysql-server-5.1 et mysql-server-core-5.1 pour tenter une réinstallation mais ça a a échoué au moment du paramétrage du compte admin et de PMA. Ce qui m'a rappelé un post d'il y a quelques mois. Le passage en 5.0 a aussi échoué.

Finalement j'ai fait un apt-get autoremove --purge sur mysql-server-5.1 en pensant faire le ménage puis j'ai réinstallé avec

sudo tasksel install lamp-server

que je ne connaissais pas (merci la doc!) et tout est rentré dans l'ordre. neutral

Là où je suis très surpris c'est que je retrouve même mes bases. Je me disais qu'avec le paramètre 'purge' elles sauteraient... neutral

Dernière modification par waielbi (Le 13/01/2010, à 23:10)

Hors ligne