Forum Linux.général Mysql refuse de démarrer sur ubuntu 12.04

Posté par  . Licence CC By‑SA.
Étiquettes :
0
9
juin
2017

Hello all

Pouvez vous m'aider?
Je ne comprends pas pourquoi mysql s'est arrêté d'un coup sans qu'on ne touche à rien et refuse de redémarrer.

Merci de votre aide.

voici le contenu du fichier de log de mysql

#--------------mysql.err----------------------------
InnoDB: End of page dump
170609 18:10:10  InnoDB: Page checksum 918991256, prior-to-4.0.14-form checksum 1886869800
InnoDB: stored checksum 918991256, prior-to-4.0.14-form stored checksum 3700301661
InnoDB: Page lsn 2 835419976, low 4 bytes of lsn at page end 835419739
InnoDB: Page number (if stored to page already) 5,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 0
InnoDB: Page may be a transaction system page
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 5.
InnoDB: You may have to recover from a backup.
InnoDB: It is also possible that your operating
InnoDB: system has corrupted its own file cache
InnoDB: and rebooting your computer removes the
InnoDB: error.
InnoDB: If the corrupt page is an index page
InnoDB: you can also try to fix the corruption
InnoDB: by dumping, dropping, and reimporting
InnoDB: the corrupt table. You can use CHECK
InnoDB: TABLE to scan your table for corruption.
InnoDB: See also http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
InnoDB: Ending processing because of a corrupt database page.
170609 18:10:10  InnoDB: Assertion failure in thread 140247083841344 in file buf0buf.c line 3623
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
16:10:10 UTC - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

key_buffer_size=16777216
read_buffer_size=131072
max_used_connections=0
max_threads=151
thread_count=0
connection_count=0

It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 346701 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0 thread_stack 0x30000
/usr/sbin/mysqld(my_print_stacktrace+0x29)[0x7f8dd1f425a9]
/usr/sbin/mysqld(handle_fatal_signal+0x483)[0x7f8dd1e05943]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0)[0x7f8dd0b4acb0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35)[0x7f8dd01b4035]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x17b)[0x7f8dd01b779b]
/usr/sbin/mysqld(+0x64fa31)[0x7f8dd2031a31]
/usr/sbin/mysqld(+0x65b1d8)[0x7f8dd203d1d8]
/usr/sbin/mysqld(+0x65bb7c)[0x7f8dd203db7c]
/usr/sbin/mysqld(+0x64b660)[0x7f8dd202d660]
/usr/sbin/mysqld(+0x61d85c)[0x7f8dd1fff85c]
/usr/sbin/mysqld(+0x61fa7c)[0x7f8dd2001a7c]
/usr/sbin/mysqld(+0x60b84a)[0x7f8dd1fed84a]
/usr/sbin/mysqld(+0x5d51b9)[0x7f8dd1fb71b9]
/usr/sbin/mysqld(_Z24ha_initialize_handlertonP13st_plugin_int+0x41)[0x7f8dd1e08011]
/usr/sbin/mysqld(+0x310a61)[0x7f8dd1cf2a61]
/usr/sbin/mysqld(_Z11plugin_initPiPPci+0xad4)[0x7f8dd1cf6184]
/usr/sbin/mysqld(+0x283d66)[0x7f8dd1c65d66]
/usr/sbin/mysqld(_Z11mysqld_mainiPPc+0x624)[0x7f8dd1c6bdb4]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7f8dd019f7ed]
/usr/sbin/mysqld(+0x27f3e9)[0x7f8dd1c613e9]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
#-----------syslog-----------------------------------
Jun  9 18:07:59 u12-14289 kernel: [    7.578672] init: mysql post-start process (1109) terminated with status 1
Jun  9 18:07:59 u12-14289 kernel: [    7.585160] type=1400 audit(1497024479.960:17): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=1318 comm="apparmor_parser"
Jun  9 18:08:00 u12-14289 kernel: [    7.763764] init: mysql main process (1330) terminated with status 1
Jun  9 18:08:00 u12-14289 kernel: [    7.763811] init: mysql main process ended, respawning
Jun  9 18:08:00 u12-14289 kernel: [    8.615063] init: mysql post-start process (1331) terminated with status 1
Jun  9 18:08:01 u12-14289 kernel: [    8.627217] type=1400 audit(1497024481.000:18): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=1366 comm="apparmor_parser"
Jun  9 18:08:01 u12-14289 kernel: [    8.848140] init: mysql main process (1378) terminated with status 1
Jun  9 18:08:01 u12-14289 kernel: [    8.848187] init: mysql respawning too fast, stopped
Jun  9 18:08:56 u12-14289 kernel: [   63.814295] type=1400 audit(1497024536.505:19): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=1601 comm="apparmor_parser"
Jun  9 18:08:56 u12-14289 kernel: [   63.994333] init: mysql main process (1613) terminated with status 1
Jun  9 18:08:56 u12-14289 kernel: [   63.994387] init: mysql main process ended, respawning
Jun  9 18:08:57 u12-14289 kernel: [   64.865199] init: mysql post-start process (1614) terminated with status 1
Jun  9 18:08:57 u12-14289 kernel: [   64.878187] type=1400 audit(1497024537.569:20): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=1647 comm="apparmor_parser"
Jun  9 18:08:57 u12-14289 kernel: [   65.086064] init: mysql main process (1659) terminated with status 1
Jun  9 18:08:57 u12-14289 kernel: [   65.086117] init: mysql main process ended, respawning
Jun  9 18:08:58 u12-14289 kernel: [   65.941266] init: mysql post-start process (1660) terminated with status 1
Jun  9 18:08:58 u12-14289 kernel: [   65.955891] type=1400 audit(1497024538.649:21): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=1709 comm="apparmor_parser"
Jun  9 18:08:58 u12-14289 kernel: [   66.173721] init: mysql main process (1721) terminated with status 1
Jun  9 18:08:58 u12-14289 kernel: [   66.173773] init: mysql respawning too fast, stopped
Jun  9 18:09:22 u12-14289 kernel: [   90.185010] type=1400 audit(1497024562.902:22): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=1779 comm="apparmor_parser"
Jun  9 18:09:23 u12-14289 kernel: [   90.401523] init: mysql main process (1791) terminated with status 1
Jun  9 18:09:23 u12-14289 kernel: [   90.401578] init: mysql main process ended, respawning
Jun  9 18:09:23 u12-14289 kernel: [   91.234733] init: mysql post-start process (1792) terminated with status 1
Jun  9 18:09:23 u12-14289 kernel: [   91.247814] type=1400 audit(1497024563.966:23): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=1825 comm="apparmor_parser"
Jun  9 18:09:24 u12-14289 kernel: [   91.443948] init: mysql main process (1837) terminated with status 1
Jun  9 18:09:24 u12-14289 kernel: [   91.443977] init: mysql main process ended, respawning
Jun  9 18:09:25 u12-14289 kernel: [   92.293503] init: mysql post-start process (1838) terminated with status 1
Jun  9 18:09:25 u12-14289 kernel: [   92.306588] type=1400 audit(1497024565.026:24): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=1871 comm="apparmor_parser"
Jun  9 18:09:25 u12-14289 kernel: [   92.521295] init: mysql main process (1883) terminated with status 1
Jun  9 18:09:25 u12-14289 kernel: [   92.521348] init: mysql respawning too fast, stopped
Jun  9 18:09:28 u12-14289 kernel: [   96.010467] type=1400 audit(1497024568.734:25): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=1918 comm="apparmor_parser"
Jun  9 18:09:28 u12-14289 kernel: [   96.203002] init: mysql main process (1930) terminated with status 1
Jun  9 18:09:28 u12-14289 kernel: [   96.203054] init: mysql main process ended, respawning
Jun  9 18:09:29 u12-14289 kernel: [   97.057185] init: mysql post-start process (1931) terminated with status 1
Jun  9 18:09:29 u12-14289 kernel: [   97.070944] type=1400 audit(1497024569.794:26): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=1964 comm="apparmor_parser"
Jun  9 18:09:30 u12-14289 kernel: [   97.285323] init: mysql main process (1976) terminated with status 1
Jun  9 18:09:30 u12-14289 kernel: [   97.285377] init: mysql main process ended, respawning
Jun  9 18:09:30 u12-14289 kernel: [   98.123799] init: mysql post-start process (1977) terminated with status 1
Jun  9 18:09:30 u12-14289 kernel: [   98.136761] type=1400 audit(1497024570.862:27): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=2010 comm="apparmor_parser"
Jun  9 18:09:31 u12-14289 kernel: [   98.330029] init: mysql main process (2022) terminated with status 1
Jun  9 18:09:31 u12-14289 kernel: [   98.330079] init: mysql respawning too fast, stopped
Jun  9 18:10:08 u12-14289 kernel: [  135.419170] type=1400 audit(1497024608.182:28): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=2101 comm="apparmor_parser"
Jun  9 18:10:08 u12-14289 kernel: [  135.636521] init: mysql main process (2113) terminated with status 1
Jun  9 18:10:08 u12-14289 kernel: [  135.636575] init: mysql main process ended, respawning
Jun  9 18:10:09 u12-14289 kernel: [  136.469413] init: mysql post-start process (2114) terminated with status 1
Jun  9 18:10:09 u12-14289 kernel: [  136.482318] type=1400 audit(1497024609.246:29): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=2147 comm="apparmor_parser"
Jun  9 18:10:09 u12-14289 kernel: [  136.669038] init: mysql main process (2159) terminated with status 1
Jun  9 18:10:09 u12-14289 kernel: [  136.669070] init: mysql main process ended, respawning
Jun  9 18:10:10 u12-14289 kernel: [  137.533076] init: mysql post-start process (2160) terminated with status 1
Jun  9 18:10:10 u12-14289 kernel: [  137.545789] type=1400 audit(1497024610.310:30): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=2193 comm="apparmor_parser"
Jun  9 18:10:10 u12-14289 kernel: [  137.758724] init: mysql main process (2205) terminated with status 1
Jun  9 18:10:10 u12-14289 kernel: [  137.758788] init: mysql respawning too fast, stopped
Jun  9 18:10:40 u12-14289 kernel: [  167.937928] init: mysql post-start process (2206) terminated with status 1
#---------------------- 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
lc-messages-dir      = /usr/share/mysql
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            = 10.200.7.124 
#skip-networking
#bind-address
#
# * Fine Tuning
#
key_buffer            = 16M
max_allowed_packet      = 16M
thread_stack            = 192K
thread_cache_size       = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover         = BACKUP
#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.
# As of 5.1 you can enable the log at runtime!
#general_log_file        = /var/log/mysql/mysql.log
#general_log             = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# 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
expire_logs_days      = 10
max_binlog_size         = 100M
binlog_do_db            = pj_labs 
#binlog_ignore_db      = include_database_name
#
# * 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!
#
# * 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

#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/
  • # Balise code

    Posté par  . Évalué à 3. Dernière modification le 09 juin 2017 à 22:12.

    Tu devrais utiliser la balise code surtout quand c'est long ;) (la coloration syntaxique ne fonctionne qu'avec les langages de programmation par contre).
    Quand tu postes un nouveau message cette balise est décrite en bas (sur pc, j'ai pas checké sur mobile)

    exemple

    ```ruby
    # Du code avec coloration syntaxique
    class Ruby
    end
    ```

    te donne

    # Du code avec coloration syntaxique
    class Ruby
    end

    Donation Bitcoin : 1N8QGrhJGWdZNQNSspm3rSGjtXaXv9Ngat

  • # Kill

    Posté par  . Évalué à 5.

    Tes logs ne montrent pas pourquoi MySQL s'est arrêté, mais la DB est corrompue, soit MySQL s'est crashé, soit il a été killé (par l'OOM Killer par exemple). Soit tu as un backup et tu récupères tes données comme ça avec une réinstallation de MySQL. Soit tu tente une récupération avec innodb force recover .

    « Rappelez-vous toujours que si la Gestapo avait les moyens de vous faire parler, les politiciens ont, eux, les moyens de vous faire taire. » Coluche

    • [^] # Re: Kill

      Posté par  (site web personnel) . Évalué à 1.

      En effet InnoDB a détecté une corruption (checksum incohérent). Tu peux suivre les instructions mentionnées sur https://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html pour dumper la table et la réimporter, ou restaurer depuis une sauvegarde.

      • [^] # Re: Kill

        Posté par  . Évalué à 3.

        D'expérience, c'est beaucoup mieux plus facile si on peut repartir depuis un backup. Parce que le recovery ne marche pas tout le temps (ou seulement sur certaines tables).

        « Rappelez-vous toujours que si la Gestapo avait les moyens de vous faire parler, les politiciens ont, eux, les moyens de vous faire taire. » Coluche

        • [^] # Re: Kill

          Posté par  (site web personnel) . Évalué à 1.

          Je confirme. J'ai mentionné l'option de repartir depuis une sauvegarde en dernier, mais c'est la meilleure. De plus il risque de manquer des données même si le dump en force-recovery fonctionne. Avec un peu de chance la corruption est sur un index, mais c'est pas tous les jours qu'on a un ticket gagnant à la loterie :-)

Suivre le flux des commentaires

Note : les commentaires appartiennent à celles et ceux qui les ont postés. Nous n’en sommes pas responsables.