{"id":2484,"date":"2023-09-10T11:51:21","date_gmt":"2023-09-10T09:51:21","guid":{"rendered":"https:\/\/linux-bibel.at\/?p=2484"},"modified":"2023-09-10T11:51:24","modified_gmt":"2023-09-10T09:51:24","slug":"mariadb-die-datenbank-unter-linux","status":"publish","type":"post","link":"https:\/\/linux-bibel.at\/index.php\/2023\/09\/10\/mariadb-die-datenbank-unter-linux\/","title":{"rendered":"Mariadb &#8211; Die Datenbank unter Linux"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Datenbanken dienen dazu, Daten zu sammeln, zu speichern, mit anderen Daten zu verbinden und diese bei Bedarf wieder zu liefern. Normalerweise werden Datenbanken in Verbindung mit einem Webserver und entsprechender Software &#8211; etwa einem CMS oder sonstiger Software eingesetzt.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Doch auch der normale Benutzer kann von Datenbanken profitieren &#8211; vor allem, wenn es um gro\u00dfe Datenmengen geht. Nehmen wir einmal an, Sie haben sehr viele Bilder oder sehr viel Musikdateien. Normale Software kann bei gro\u00dfen Mengen dabei schon an ihre Grenzen sto\u00dfen &#8211; sie startet langsam, sie reagiert langsam. Meist nutzt Software eigene kleine Datenbanken &#8211; wie etwa SQLite &#8211; bis zu einer gewissen Menge an Daten kommt diese kleine Datenbank auch problemlos damit klar &#8211; irgendwann sollte man jedoch den Einsatz einer gr\u00f6\u00dferen, professionelleren Datenbank in Erw\u00e4gung ziehen.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Unter Linux findet man immer wieder Anwendungen, die es erm\u00f6glichen, gr\u00f6\u00dfere Datenbanken einzusetzen. In diesem Beitrag sehen wir uns als Beispiel die Software\u00a0Digikam\u00a0an. Dabei sehen wir nicht nur, wie man eine Software mit einer Datenbank verbindet &#8211; sondern auch, wie man eine Datenbank einrichtet.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In diesem Beispiel setzen wir die wohl bekannteste Datenbank unter Linux &#8211; MariaDB an. MariaDB ist die freie Version von MySQL von Oracle. Oracle &#8211; die Firma hinter MySQL &#8211; wollte nicht wirklich mit freien Entwicklern zusammen arbeiten &#8211; die freien Entwickler setzten sich ab und brachten MariaDB auf die Welt.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">MariaDB installieren und absichern<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Unter auf Debian basierenden Linux-Distributionen installieren Sie diese Software wie \u00fcblich ganz einfach \u00fcber die\u00a0Paket-Verwaltung\u00a0durch das Paket &#8222;<strong>mariadb-server<\/strong>&#8222;, unter Void Linux etwa durch die Pakete &#8222;<strong>mariadb mariadb-client<\/strong>&#8222;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Unter Debian l\u00e4uft die Datenbank nach der Installation automatisch &#8211; Sie k\u00f6nnen dies \u00fcber\u00a0<a href=\"https:\/\/linux-bibel.at\/index.php\/2023\/09\/03\/systemd-die-steuerzentrale-von-linux\/\" data-type=\"post\" data-id=\"783\">Systemd<\/a>\u00a0als\u00a0Administrator\u00a0am\u00a0Terminal\u00a0pr\u00fcfen:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl status mariadb.service<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Unter Void Linux m\u00fcssen wir den Dienst erst erlauben. Erst richten wir das Arbeitsverzeichnis ein:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql_install_db --user=mysql --basedir=\/usr --datadir=\/var\/lib\/mysql<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Jetzt aktivieren wir den Dienst:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ln -s \/etc\/sv\/mysqld \/var\/service\/mysqld<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Hierbei wird einfach gesagt der SQL-Server mit dem Runit-Dienst (<em>das Pendant zu Systemd unter Debian<\/em>) verbunden. Man legt einen\u00a0<a href=\"https:\/\/linux-bibel.at\/index.php\/2023\/09\/10\/symbolische-links-und-hardlinks-unter-linux\/\" data-type=\"post\" data-id=\"2395\" target=\"_blank\" rel=\"noreferrer noopener\">Symlink<\/a>\u00a0von &#8222;<em>\/etc\/sv\/mysqld\/<\/em>&#8220; in das Runit-Verzeichnis unter &#8222;<em>\/var\/service\/<\/em>&#8222;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Jetzt startet man den Dienst:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sv start mysqld<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Nachdem die Datenbank l\u00e4uft, sichern wir diese ab:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql_secure_installation<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-1024x576.jpg\" alt=\"\" class=\"wp-image-2485\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB\n      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!\n\nIn order to log into MariaDB to secure it, we'll need the current\npassword for the root user. If you've just installed MariaDB, and\nhaven't set the root password yet, you should just press enter here.\n\nEnter current password for root (enter for none): <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Bisher gibt es noch kein Passwort f\u00fcr den root-Benutzer der Datenbank, wir erstellen also einen &#8211; best\u00e4tigen Sie mit\u00a0<strong><kbd>Eingabe<\/kbd><\/strong>\u00a0ohne etwas einzugeben:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-1-1024x576.jpg\" alt=\"\" class=\"wp-image-2486\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-1-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-1-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-1-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-1-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-1.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>Setting the root password or using the unix_socket ensures that nobody\ncan log into the MariaDB root user without the proper authorisation.\n\nYou already have your root account protected, so you can safely answer 'n'.\n\nSwitch to unix_socket authentication &#91;Y\/n]<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Best\u00e4tigen Sie, um zum UNIX-Socket zu wechseln, mit\u00a0<strong><kbd>Eingabe<\/kbd><\/strong>\u00a0(<em>dann wird unser root-Passwort genutzt<\/em>):<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-2-1024x576.jpg\" alt=\"\" class=\"wp-image-2487\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-2-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-2-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-2-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-2-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-2.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>Enabled successfully!\nReloading privilege tables..\n ... Success!\n\n\nYou already have your root account protected, so you can safely answer 'n'.\n\nChange the root password? &#91;Y\/n]<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Wir werden gefragt, ob wir jetzt das Passwort f\u00fcr den Datenbank-Administrator wechseln m\u00f6chten &#8211; mein Tipp:\u00a0<strong>Nein<\/strong>! Vor allem, wenn Sie einen eigenen root-Benutzer des Systems (<em>nicht der Datenbank<\/em>) haben &#8211; dies erledigen wir sp\u00e4ter &#8211; denn immer wieder vergessen Benutzer dieses Passwort kurz nach der Einrichtung. Geben Sie also &#8222;<strong><kbd>n<\/kbd><\/strong>&#8220; ein und best\u00e4tigen:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> ... skipping.\n\nBy default, a MariaDB installation has an anonymous user, allowing anyone\nto log into MariaDB without having to have a user account created for\nthem. This is intended only for testing, and to make the installation\ngo a bit smoother. You should remove them before moving into a\nproduction environment.\n\nRemove anonymous users? &#91;Y\/n]<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Damit niemand ohne Rechte auf die Daten in der Datenbank zugreifen kann, best\u00e4tigen wir mit\u00a0<strong><kbd>Eingabe<\/kbd><\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> ... Success!\n\nNormally, root should only be allowed to connect from 'localhost'.  This\nensures that someone cannot guess at the root password from the network.\n\nDisallow root login remotely? &#91;Y\/n]<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Hierbei kommt es darauf an &#8211; m\u00f6chten Sie als Datenbank-Administrator \u00fcber das Netzwerk die Datenbank verwalten oder nur vom Rechner aus, auf dem die Datenbank installiert ist. Sicherer ist es nat\u00fcrlich, nicht vom Netzwerk aus zugreifen zu k\u00f6nnen &#8211; also\u00a0<strong><kbd>Eingabe<\/kbd><\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> ... Success!\n\nBy default, MariaDB comes with a database named 'test' that anyone can\naccess.  This is also intended only for testing, and should be removed\nbefore moving into a production environment.\n\nRemove test database and access to it? &#91;Y\/n]<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">MariaDB hat eine Test-Datenbank installiert &#8211; in der Regel brauchen wir diese nicht, sie kann zum Lernen \u00fcber die Arbeit mit der Datenbank dienen &#8211; brauchen wir nicht, also\u00a0<strong><kbd>Eingabe<\/kbd><\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> - Dropping test database...\n ... Success!\n - Removing privileges on test database...\n ... Success!\n\nReloading the privilege tables will ensure that all changes made so far\nwill take effect immediately.\n\nReload privilege tables now? &#91;Y\/n]<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Wir best\u00e4tigen noch einmal die Einstellungen und haben damit die Einrichtung abgeschlossen.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Wie beschrieben &#8211; wir haben die abgesicherte Einrichtung der Datenbank abgeschlossen, jetzt k\u00f6nnen wir in die Datenbank wechseln und etwa ein Passwort f\u00fcr den Datenbank-Administrator erstellen. Dies ist optional &#8211; Sie k\u00f6nnen mit Ihrem root-Passwort in die Datenbank, alternativ eben mit &#8222;<strong><kbd><code>sudo<\/code><\/kbd><\/strong>&#8222;. Um ein root-Passwort f\u00fcr die Datenbank zu erstellen:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mariadb<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Oder eben mit &#8222;<strong><code>sudo<\/code><\/strong>&#8222;:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mariadb<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-3-1024x576.jpg\" alt=\"\" class=\"wp-image-2488\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-3-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-3-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-3-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-3-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-3.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>Welcome to the MariaDB monitor.  Commands end with ; or \\g.\nYour MariaDB connection id is 11\nServer version: 10.5.10-MariaDB-debug MariaDB Server\n\nCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n\nMariaDB &#91;(none)]&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Wir finden uns jetzt im Prompt der Datenbank wieder, nach &#8222;MariaDB [(none)]>&#8220; wartet die Datenbank auf Ihre Eingaben. Erstellen wir das root-Passwort der Datenbank &#8211; &#8222;<strong>PASSWORT<\/strong>&#8220; ersetzen Sie durch ein sicheres Passwort:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>GRANT ALL ON *.* TO 'admin'@'localhost' IDENTIFIED BY 'PASSWORT' WITH GRANT OPTION;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Wir \u00fcbernehmen die Einstellungen:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>FLUSH PRIVILEGES;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Jetzt k\u00f6nnen wir uns wieder ausloggen:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>QUIT;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">MariaDB nutzen<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Wie oben schon beschrieben nutzen wir f\u00fcr dieses Beispiel Digikam &#8211; Digikam soll die Datenbank nutzen k\u00f6nnen. Wir erstellen die daf\u00fcr n\u00f6tige Datenbank, den zugeh\u00f6rigen Benutzer und vergeben die Rechte. Grunds\u00e4tzlich k\u00f6nnen Sie den Vorgang f\u00fcr jede andere Software \u00fcbernehmen:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Zu Beginn loggen wir uns in die Datenbank ein &#8211; entweder als root:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mariadb\nsudo mariadb<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Oder, Sie haben ein root-Passwort f\u00fcr die Datenbank erstellt:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u root -p\nsudo mysql -u root -p<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-4-1024x576.jpg\" alt=\"\" class=\"wp-image-2489\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-4-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-4-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-4-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-4-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-4.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Jetzt erstellen wir die Datenbank &#8222;<strong>digikam<\/strong>&#8222;:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE DATABASE digikam;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-5-1024x576.jpg\" alt=\"\" class=\"wp-image-2490\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-5-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-5-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-5-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-5-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-5.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Damit w\u00e4re die passende Datenbank erstellt &#8211; Sie k\u00f6nnen diese aber nat\u00fcrlich benennen, wie Sie m\u00f6chten. Jetzt erstellen wir den Benutzer &#8222;<strong>digikam<\/strong>&#8220; und dessen Passwort &#8211; hier ersetzen Sie &#8222;<strong>PASSWORT<\/strong>&#8220; durch ein Passwort:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE USER 'digikam'@'%' IDENTIFIED BY 'PASSWORT';<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-6-1024x576.jpg\" alt=\"\" class=\"wp-image-2491\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-6-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-6-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-6-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-6-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-6.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Jetzt \u00fcbergeben wir alle Rechte an der Datenbank &#8222;<strong>digikam<\/strong>&#8220; an den Benutzer &#8222;<strong>digikam<\/strong>&#8220; &#8211; &#8222;<strong>PASSWORT<\/strong>&#8220; ersetzen Sie dabei wieder durch das erstellte Passwort f\u00fcr den Benutzer:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>GRANT ALL PRIVILEGES ON digikam.* TO 'digikam'@'%';\nGRANT ALL ON *.* TO 'digikam'@'%' IDENTIFIED BY 'PASSWORT';<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-7-1024x576.jpg\" alt=\"\" class=\"wp-image-2492\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-7-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-7-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-7-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-7-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-7.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Jetzt \u00fcbernehmen wir die Einstellungen:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>FLUSH PRIVILEGES;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Und nun loggen wir uns wieder aus:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>QUIT;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">In Digikam \u00f6ffnen wir jetzt die Einstellungen, hier finden wir auch die Einstellungen f\u00fcr die Datenbank &#8211; &#8222;<em>Einstellungen \u2192 Digikam einrichten \u2192 Datenbank<\/em>&#8222;:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-8-1024x576.jpg\" alt=\"\" class=\"wp-image-2493\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-8-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-8-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-8-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-8-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/mariadb-8.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Hier geben Sie jetzt als Datenbank-Typ &#8222;<strong>MySQL-Server<\/strong>&#8220; an, den Rechnernamen setzen Sie auf &#8222;<strong>localhost<\/strong>&#8220; (<em>andernfalls die IP-Adresse bei einem entfernten Rechner<\/em>). Weiter geben Sie nat\u00fcrlich den Benutzer der Datenbank an und dessen Passwort &#8211; darunter folgt die angelegte Datenbank. Nach dem \u00dcbernehmen der Einstellungen kommt die jeweilige Software auch mit riesigen Datenmengen problemlos klar.<\/p>\n<div class=\"pld-like-dislike-wrap pld-custom\">\r\n    <div class=\"pld-like-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-like-trigger pld-like-dislike-trigger  \" title=\"Gef\u00e4llt mir\" data-post-id=\"2484\" data-trigger-type=\"like\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                            <img src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/12\/Daumen-Hoch.png\" alt=\"Gef\u00e4llt mir\" \/>\r\n            <\/a>\r\n    <span class=\"pld-like-count-wrap pld-count-wrap\">0    <\/span>\r\n<\/div><div class=\"pld-dislike-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-dislike-trigger pld-like-dislike-trigger  \" title=\"Gef\u00e4llt mir nicht\" data-post-id=\"2484\" data-trigger-type=\"dislike\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                            <img src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/12\/Daumen-Runter.png\" alt=\"Gef\u00e4llt mir nicht\" \/>\r\n            <\/a>\r\n    <span class=\"pld-dislike-count-wrap pld-count-wrap\">1<\/span>\r\n<\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Datenbanken dienen dazu, Daten zu sammeln, zu speichern, mit anderen Daten zu verbinden und diese bei Bedarf wieder zu liefern. Normalerweise werden Datenbanken in Verbindung mit einem Webserver und entsprechender Software &#8211; etwa einem CMS oder sonstiger Software eingesetzt. Doch auch der normale Benutzer kann von Datenbanken profitieren &#8211; vor allem, wenn es um gro\u00dfe [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2490,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[311,38,308],"tags":[126,39,310],"class_list":["post-2484","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-datenbank","category-netzwerk","category-server","tag-datenbank","tag-netzwerk","tag-server"],"_links":{"self":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/2484","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/comments?post=2484"}],"version-history":[{"count":1,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/2484\/revisions"}],"predecessor-version":[{"id":2494,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/2484\/revisions\/2494"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media\/2490"}],"wp:attachment":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media?parent=2484"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/categories?post=2484"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/tags?post=2484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}