Zusätzliche MariaDB-MySQL-Instanz auf Raspberry Pi 5 OS-Fehler beim StartenLinux

Linux verstehen
Anonymous
 Zusätzliche MariaDB-MySQL-Instanz auf Raspberry Pi 5 OS-Fehler beim Starten

Post by Anonymous »

Ich habe eine MariaDB-MySQL- und phpMyAdmin-Installation auf meinem Raspberry Pi-Betriebssystem (Debian-basiert).
Ich baue eine zusätzliche MySQL-Instanz und erhalte beim Starten eine Fehlermeldung und möglicherweise einen kleinen Schluckauf beim Initialisieren.
Raspberry/Debian legt die Dateien gerne an anderen Orten ab, als Sie in anderen Tutorials/Dokumentationen sehen. Ok, los geht's:
Der Eigentümer aller Dateien ist MySQL und nicht Root. So haben es mein ursprünglicher phpmyadmin und mariadb gemacht, und ich bleibe dabei.
| Erstellen einer neuen Servicedatei und Ändern der Berechtigungen:

Code: Select all

sudo touch /etc/systemd/system/mysqld@.service

sudo chown -v -R  mysql:mysql /etc/systemd/system/mysqld@.service
Inhalt der Datei:

Code: Select all

[Unit]
Description=MySQL Multi Server for instance %i
After=syslog.target
After=network.target

[Service]
User=mysql
Group=mysql
Type=forking
ExecStart=/usr/bin/mysqld_multi start %i
ExecStop=/usr/bin/mysqld_multi stop %i
Restart=always
PrivateTmp=true

[Install]
WantedBy=multi-user.target
| Neuer Datenordner, Socket-Ordner, Protokollordner und Protokolldatei.

Code: Select all

sudo mkdir -p -v /var/lib/mysql_FL
sudo mkdir -p -v /var/run/mysqld/mysql_FL
sudo mkdir -p -v /var/log/mysql_FL
sudo chown mysql:mysql -v /var/lib/mysql_FL
sudo chown mysql:mysql -v /var/run/mysqld/mysql_FL
sudo chown -v -R  mysql:mysql /var/log/mysql_FL
sudo touch /var/log/mysql_FL/mysql_FL.log
sudo chown -v -R  mysql:mysql /var/log/mysql_FL/mysql_FL.log
| Hinzufügen von „my.cnf“ unter „/etc/mysql/my.cnf“:

Code: Select all

[mysqld_multi]
mysqld = /usr/bin/mysqld_safe --basedir=/usr

[mysql_FL]
port=3307
datadir=/var/lib/mysql_FL
socket=/var/run/mysqld/mysql_FL/mysql.sock
pid-file=/var/run/mysqld/mysql_FL/mysqld1.pid

log-error=/var/log/mysql_FL/mysql_FL.log

# Disabling symbolic-links is recommended to prevent assorted security
# risks
symbolic-links=0
| Initialisierung der neuen MySQL-Datenbank im Terminal:

Code: Select all

sudo mysql_install_db --user=mysql --datadir=/var/lib/mysql_FL/

Installing MariaDB/MySQL system tables in '/var/lib/mysql_FL/' ...
2025-01-06  3:51:04 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.
OK

To start mariadbd at boot time you have to copy
support-files/mariadb.service to the right place for your system

Two all-privilege accounts were created.
One is root@localhost, it has no password, but you need to
be system 'root' user to connect. Use, for example, sudo mysql
The second is mysql@localhost, it has no password either, but
you need to be the system 'mysql' user to connect.
After connecting you can set the password, if you would need to be
able to connect as any of these users with a password and without sudo

See the MariaDB Knowledgebase at https://mariadb.com/kb

You can start the MariaDB daemon with:
cd '/usr' ; /usr/bin/mariadb-safe --datadir='/var/lib/mysql_FL/'

You can test the MariaDB daemon with mysql-test-run.pl
cd '/usr/share/mysql/mysql-test' ; perl mariadb-test-run.pl

Please report any problems at https://mariadb.org/jira

The latest information about MariaDB is available at https://mariadb.org/.

Consider joining MariaDB's strong and vibrant community:
https://mariadb.org/get-involved/
Ich vermute, dass etwas nicht genau so gelaufen ist, wie es sollte. Aber auf dem Trockenen bin ich hier ein bisschen ein Fisch.
| Starten der Instanz:

Code: Select all

sudo systemctl start mysqld@mysql_FL

Job for mysqld@mysql_FL.service failed because the control process exited with error code.
See "systemctl status mysqld@mysql_FL.service" and "journalctl -xeu mysqld@mysql_FL.service" for details.
Sehen wir uns die Fehler an:

Code: Select all

systemctl status mysqld@mysql_FL.service

× mysqld@mysql_FL.service - MySQL Multi Server for instance mysql_FL
Loaded: loaded (/etc/systemd/system/mysqld@.service; disabled; preset: enabled)
Active: failed (Result: exit-code) since Mon 2025-01-06 04:26:37 CET; 1min 28s ago
Process: 6993 ExecStart=/usr/bin/mysqld_multi start mysql_FL (code=exited, status=13)
CPU: 39ms

Jan 06 04:26:37 raspberrypi systemd[1]: Failed to start mysqld@mysql_FL.service - MySQL Multi Server for instance mysql_FL.
Jan 06 04:26:37 raspberrypi systemd[1]: mysqld@mysql_FL.service: Scheduled restart job, restart counter is at 5.
Jan 06 04:26:37 raspberrypi systemd[1]: Stopped mysqld@mysql_FL.service - MySQL Multi Server for instance mysql_FL.
Jan 06 04:26:37 raspberrypi systemd[1]: mysqld@mysql_FL.service: Start request repeated too quickly.
Jan 06 04:26:37 raspberrypi systemd[1]: mysqld@mysql_FL.service: Failed with result 'exit-code'.
Jan 06 04:26:37 raspberrypi systemd[1]: Failed to start mysqld@mysql_FL.service - MySQL Multi Server for instance mysql_FL.
Und das andere:

Code: Select all

journalctl -xeu mysqld@mysql_FL.service

Jan 06 04:11:29 raspberrypi systemd[1]: Stopped mysqld@mysql_FL.service - MySQL Multi Server for instance mysql_FL.
░░ Subject: A stop job for unit mysqld@mysql_FL.service has finished
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A stop job for unit mysqld@mysql_FL.service has finished.
░░
░░ The job identifier is 4642 and the job result is done.
Jan 06 04:11:29 raspberrypi systemd[1]: mysqld@mysql_FL.service: Start request repeated too quickly.
Jan 06 04:11:29 raspberrypi systemd[1]: mysqld@mysql_FL.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ The unit mysqld@mysql_FL.service has entered the 'failed' state with result 'exit-code'.
Jan 06 04:11:29 raspberrypi systemd[1]: Failed to start mysqld@mysql_FL.service - MySQL Multi Server for instance mysql_FL.
░░ Subject: A start job for unit mysqld@mysql_FL.service has failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit mysqld@mysql_FL.service has finished with a failure.
░░
░░ The job identifier is 4642 and the job result is failed.
lines 223-245/245 (END)
Dies ist für mich der vierte Tag der Arbeit daran und so weit bin ich gekommen. Ich würde mich wirklich über etwas Input freuen.
Vielen, vielen Dank!

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post