Ich verwende Arch Linux 4.8.4-1 auf einer 64-Bit-Installation. Ich habe MariaDB über installiert pacman
. Wenn ich versuche, damit zu beginnen systemctl start mysqld
, gibt es mir
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
Die Ausgabe von systemctl status mariadb.service
ist
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2016-11-02 16:55:12 IST; 3min 6s ago
Process: 5123 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 5070 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set
Process: 5067 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Main PID: 5123 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
Nov 02 16:55:11 pranav-laptop systemd[1]: Starting MariaDB database server...
Nov 02 16:55:12 pranav-laptop mysqld[5123]: 2016-11-02 16:55:12 140082509282496 [Note] /usr/sbin/mysqld (mysqld 10.1.18-MariaDB) starting as process 5
Nov 02 16:55:12 pranav-laptop mysqld[5123]: 2016-11-02 16:55:12 140082509282496 [Warning] Can't create test file /var/lib/mysql/pranav-laptop.lower-te
Nov 02 16:55:12 pranav-laptop mysqld[5123]: [90B blob data]
Nov 02 16:55:12 pranav-laptop systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Nov 02 16:55:12 pranav-laptop systemd[1]: Failed to start MariaDB database server.
Nov 02 16:55:12 pranav-laptop systemd[1]: mariadb.service: Unit entered failed state.
Nov 02 16:55:12 pranav-laptop systemd[1]: mariadb.service: Failed with result 'exit-code'.
Wenn ich noch etwas posten muss, lass es mich wissen ...
UPDATE: Nachdem ich den Kommentar von Jérémy Munoz ausprobiert habe, startet mysql immer noch nicht, aber ich bekomme einen anderensystemctl status mariadb.service
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2016-11-02 21:03:24 IST; 4min 7s ago
Process: 14350 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 14296 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl se
Process: 14294 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Main PID: 14350 (code=exited, status=1/FAILURE)
Nov 02 21:03:24 pranav-laptop mysqld[14350]: 2016-11-02 21:03:24 140412958252224 [ERROR] Could not open mysql.plugin table. Some plugins may be not lo
Nov 02 21:03:24 pranav-laptop mysqld[14350]: 2016-11-02 21:03:24 140412958235392 [Warning] Failed to load slave replication state from table mysql.gti
Nov 02 21:03:24 pranav-laptop mysqld[14350]: 2016-11-02 21:03:24 140412362684160 [Note] InnoDB: Dumping buffer pool(s) not yet started
Nov 02 21:03:24 pranav-laptop mysqld[14350]: 2016-11-02 21:03:24 140412958252224 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' d
Nov 02 21:03:24 pranav-laptop mysqld[14350]: 2016-11-02 21:03:24 140412958252224 [Note] Server socket created on IP: '::'.
Nov 02 21:03:24 pranav-laptop mysqld[14350]: 2016-11-02 21:03:24 140412958252224 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mys
Nov 02 21:03:24 pranav-laptop systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Nov 02 21:03:24 pranav-laptop systemd[1]: Failed to start MariaDB database server.
Nov 02 21:03:24 pranav-laptop systemd[1]: mariadb.service: Unit entered failed state.
Nov 02 21:03:24 pranav-laptop systemd[1]: mariadb.service: Failed with result 'exit-code'.
UPDATE: Nach dem Ausführen mysql_install_db
erhalte ich folgende Fehlermeldung:
FATAL ERROR: Could not find ./bin/my_print_defaults
If you compiled from source, you need to either run 'make install' to
copy the software into the correct location ready for operation.
If you don't want to do a full install, you can use the --srcddir
option to only install the mysql database and privilege tables
If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.
The latest information about mysql_install_db is available at
https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
mysql
mariadb
arch-linux
Pranav Nutalapati
quelle
quelle
/etc/mysql/my.cnf
.Antworten:
Wenn Sie keine echten Daten in Ihrer Datenbank haben, löschen Sie alles in
/var/lib/mysql
.Versuchen Sie danach erneut, den Befehl auszuführen
mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
, um das Datenbankverzeichnis zu initialisieren.quelle
Sie müssen ausführen
mysql_install_db
, um das MySQL-Datenverzeichnis zu initialisieren.quelle
Ich hatte das gleiche Problem mit Ubuntu 18.04m Paketen, die nicht gestartet werden konnten oder sonst ...
Ich habe das Problem gelöst, indem ich die richtige Paketliste und Signatur von dieser Site hinzugefügt habe .
et voila ..
quelle
mysql_install_db
Ding manuell machen musste .Das gleiche Problem wurde behoben, nachdem die folgenden Schritte ausgeführt wurden. Deinstallierte die Mariadb-Maridb-Server-Pakete. Entfernte das Verzeichnis / var / lib / mysql. Neuinstallation der Mariadb-, Mariadb-Server-Pakete. systemct start mariadb; systemctl enable mariadb (Problem behoben).
quelle