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 12/03/2020, à 14:27

johhnry

Impossible de démarrer MariaDB

Bonjour à tous,

J'ai un serveur qui tourne avec Ubuntu server (5.3.0-1018-raspi2) sur Raspberry Pi 3B+ et j'ai fait une installation LAMP (Apache, PHP, MySQL).
La partie serveur fonctionne bien mais j'ai voulu changer de système de base de données à MariaDB.

Après plusieurs installations et réinstallations de MariaDB et de MySQL (apt purge, reinstall...) MariaDB ne veut pas démarrer.

Voici la sortie des commandes :

$ sudo systemctl start mariadb
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
$ sudo systemctl status mariadb.service
● mariadb.service - MariaDB 10.3.22 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2020-03-12 13:23:24 UTC; 30s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 4873 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
  Process: 4874 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 4876 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environ
  Process: 4885 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 4916 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 4918 ExecStartPost=/etc/mysql/debian-start (code=exited, status=203/EXEC)
 Main PID: 4885 (code=exited, status=0/SUCCESS)
   Status: "MariaDB server is down"

Mar 12 13:23:22 ubuntu mysqld[4885]: 2020-03-12 13:23:22 0 [Note] Event Scheduler: Purging the queue. 0 events
Mar 12 13:23:22 ubuntu mysqld[4885]: 2020-03-12 13:23:22 0 [Note] InnoDB: FTS optimize thread exiting.
Mar 12 13:23:22 ubuntu mysqld[4885]: 2020-03-12 13:23:22 0 [Note] InnoDB: Starting shutdown...
Mar 12 13:23:22 ubuntu mysqld[4885]: 2020-03-12 13:23:22 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
Mar 12 13:23:22 ubuntu mysqld[4885]: 2020-03-12 13:23:22 0 [Note] InnoDB: Buffer pool(s) dump completed at 200312 13:23:22
Mar 12 13:23:24 ubuntu mysqld[4885]: 2020-03-12 13:23:24 0 [Note] InnoDB: Shutdown completed; log sequence number 1625586; transaction id 22
Mar 12 13:23:24 ubuntu mysqld[4885]: 2020-03-12 13:23:24 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
Mar 12 13:23:24 ubuntu mysqld[4885]: 2020-03-12 13:23:24 0 [Note] /usr/sbin/mysqld: Shutdown complete
Mar 12 13:23:24 ubuntu systemd[1]: mariadb.service: Failed with result 'exit-code'.
Mar 12 13:23:24 ubuntu systemd[1]: Failed to start MariaDB 10.3.22 database server.

Et finalement :

$ sudo journalctl -xe
-- The error number returned by this process is ERRNO.
Mar 12 13:23:22 ubuntu systemd[1]: mariadb.service: Control process exited, code=exited, status=203/EXEC
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- An ExecStartPost= process belonging to unit mariadb.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 203.
Mar 12 13:23:22 ubuntu mysqld[4885]: 2020-03-12 13:23:22 0 [Note] /usr/sbin/mysqld (initiated by: unknown): Normal shutdown
Mar 12 13:23:22 ubuntu mysqld[4885]: 2020-03-12 13:23:22 0 [Note] Event Scheduler: Purging the queue. 0 events
Mar 12 13:23:22 ubuntu mysqld[4885]: 2020-03-12 13:23:22 0 [Note] InnoDB: FTS optimize thread exiting.
Mar 12 13:23:22 ubuntu mysqld[4885]: 2020-03-12 13:23:22 0 [Note] InnoDB: Starting shutdown...
Mar 12 13:23:22 ubuntu mysqld[4885]: 2020-03-12 13:23:22 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
Mar 12 13:23:22 ubuntu mysqld[4885]: 2020-03-12 13:23:22 0 [Note] InnoDB: Buffer pool(s) dump completed at 200312 13:23:22
Mar 12 13:23:24 ubuntu mysqld[4885]: 2020-03-12 13:23:24 0 [Note] InnoDB: Shutdown completed; log sequence number 1625586; transaction id 22
Mar 12 13:23:24 ubuntu mysqld[4885]: 2020-03-12 13:23:24 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
Mar 12 13:23:24 ubuntu mysqld[4885]: 2020-03-12 13:23:24 0 [Note] /usr/sbin/mysqld: Shutdown complete
Mar 12 13:23:24 ubuntu systemd[1]: mariadb.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit mariadb.service has entered the 'failed' state with result 'exit-code'.
Mar 12 13:23:24 ubuntu systemd[1]: Failed to start MariaDB 10.3.22 database server.
-- Subject: A start job for unit mariadb.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit mariadb.service has finished with a failure.
-- 
-- The job identifier is 1383 and the job result is failed.
Mar 12 13:23:24 ubuntu sudo[4870]: pam_unix(sudo:session): session closed for user root
Mar 12 13:23:55 ubuntu sudo[4921]:   ubuntu : TTY=pts/0 ; PWD=/home/ubuntu ; USER=root ; COMMAND=/usr/bin/systemctl status mariadb.service
Mar 12 13:23:55 ubuntu sudo[4921]: pam_unix(sudo:session): session opened for user root by ubuntu(uid=0)
Mar 12 13:23:57 ubuntu sudo[4921]: pam_unix(sudo:session): session closed for user root
Mar 12 13:24:24 ubuntu sudo[4924]:   ubuntu : TTY=pts/0 ; PWD=/home/ubuntu ; USER=root ; COMMAND=/usr/bin/journalctl -xe
Mar 12 13:24:24 ubuntu sudo[4924]: pam_unix(sudo:session): session opened for user root by ubuntu(uid=0)

Quelqu'un a-t-il une solution?

Merci

Hors ligne

#2 Le 12/03/2020, à 14:48

johhnry

Re : Impossible de démarrer MariaDB

J'ai trouvé ma réponse !

https://unix.stackexchange.com/question … o-debian-9

Encore désolé!

Hors ligne

#3 Le 12/03/2020, à 14:50

geole

Re : Impossible de démarrer MariaDB

Bonjour
La ligne d'erreur
Process: 4918 ExecStartPost=/etc/mysql/debian-start (code=exited, status=203/EXEC)
Quel est le contenu de ce fichier


Les grilles de l'installateur https://doc.ubuntu-fr.org/tutoriel/inst … _subiquity
"gedit admin:///etc/fstab" est proscrit,  utilisez "pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY xdg-open /etc/fstab" Voir  https://doc.ubuntu-fr.org/gedit
Les partitions EXT4 des disques externes => https://forum.ubuntu-fr.org/viewtopic.p … #p22697248

Hors ligne

#4 Le 12/03/2020, à 14:55

johhnry

Re : Impossible de démarrer MariaDB

Voici :

$ cat /etc/mysql/debian-start
#!/bin/bash
#
# This script is executed by "/etc/init.d/mysql" on every (re)start.
#
# Changes to this file will be preserved when updating the Debian package.
#
# NOTE: This file is read only by the traditional SysV init script, not systemd.
#

source /usr/share/mysql/debian-start.inc.sh

if [ -f /etc/default/mysql ]; then
  . /etc/default/mysql
fi

MYSQL="/usr/bin/mysql --defaults-file=/etc/mysql/debian.cnf"
MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
# Don't run full mysql_upgrade on every server restart, use --version-check to do it only once
MYUPGRADE="/usr/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf --version-check"
MYCHECK="/usr/bin/mysqlcheck --defaults-file=/etc/mysql/debian.cnf"
MYCHECK_SUBJECT="WARNING: mysqlcheck has found corrupt tables"
MYCHECK_PARAMS="--all-databases --fast --silent"
MYCHECK_RCPT="${MYCHECK_RCPT:-root}"

## Checking for corrupt, not cleanly closed (only for MyISAM and Aria engines) and upgrade needing tables.

# The following commands should be run when the server is up but in background
# where they do not block the server start and in one shell instance so that
# they run sequentially. They are supposed not to echo anything to stdout.
# If you want to disable the check for crashed tables comment
# "check_for_crashed_tables" out.
# (There may be no output to stdout inside the background process!)

# Need to ignore SIGHUP, as otherwise a SIGHUP can sometimes abort the upgrade
# process in the middle.
trap "" SIGHUP
(
  upgrade_system_tables_if_necessary;
  check_root_accounts;
  check_for_crashed_tables;
) >&2 &

exit 0

Hors ligne

#5 Le 12/03/2020, à 15:15

geole

Re : Impossible de démarrer MariaDB

upgrade_system_tables_if_necessary – This check runs the mysql_upgrade script with the username and password provided by the /etc/mysql/debian.cnf. Running mysql_upgrade multiple times does not harm anything since running it on an “upgraded” database does nothing. However, it does add to the time it takes to start up mysqld.

Je ne sais pas si cela est encore paramétré pareil.    Regarde le contenu du fichier /etc/mysql/debian.cnf
Ne  publie pas son contenu


Les grilles de l'installateur https://doc.ubuntu-fr.org/tutoriel/inst … _subiquity
"gedit admin:///etc/fstab" est proscrit,  utilisez "pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY xdg-open /etc/fstab" Voir  https://doc.ubuntu-fr.org/gedit
Les partitions EXT4 des disques externes => https://forum.ubuntu-fr.org/viewtopic.p … #p22697248

Hors ligne