Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Nächste Überarbeitung
Vorhergehende Überarbeitung
centos:mariadb [08.03.2015 00:13. ] – angelegt djangocentos:mariadb [22.07.2019 14:52. ] (aktuell) – Externe Bearbeitung 127.0.0.1
Zeile 10: Zeile 10:
   * [[wetter:wview:start|wview]]   * [[wetter:wview:start|wview]]
   * [[centos:piwik|Piwik]]   * [[centos:piwik|Piwik]]
 +  * [[centos:web_c7:nextcloud|Nextcloud]]
  
 ===== Installation ===== ===== Installation =====
Zeile 22: Zeile 23:
 <code>Name        : mariadb-server <code>Name        : mariadb-server
 Epoch       : 1 Epoch       : 1
-Version     : 5.5.41 +Version     : 5.5.52 
-Release     : 2.el7_0+Release     : 1.el7
 Architecture: x86_64 Architecture: x86_64
-Install Date: Sat 07 Mar 2015 09:24:40 PM CET+Install Date: Mon 20 Feb 2017 06:20:37 PM CET
 Group       : Applications/Databases Group       : Applications/Databases
-Size        : 58205155+Size        : 58204272
 License     : GPLv2 with exceptions and LGPLv2 and BSD License     : GPLv2 with exceptions and LGPLv2 and BSD
-Signature   : RSA/SHA256, Thu 05 Feb 2015 05:28:32 PM CET, Key ID 24c6a8a7f4a80eb5 +Signature   : RSA/SHA256, Sun 20 Nov 2016 08:24:51 PM CET, Key ID 24c6a8a7f4a80eb5 
-Source RPM  : mariadb-5.5.41-2.el7_0.src.rpm +Source RPM  : mariadb-5.5.52-1.el7.src.rpm 
-Build Date  : Thu 05 Feb 2015 05:12:40 PM CET +Build Date  : Tue 15 Nov 2016 02:20:59 AM CET 
-Build Host  : worker1.bsys.centos.org+Build Host  : c1bm.rdu2.centos.org
 Relocations : (not relocatable) Relocations : (not relocatable)
 Packager    : CentOS BuildSystem <http://bugs.centos.org> Packager    : CentOS BuildSystem <http://bugs.centos.org>
Zeile 82: Zeile 83:
 /usr/lib64/mysql/plugin/auth_test_plugin.so /usr/lib64/mysql/plugin/auth_test_plugin.so
 /usr/lib64/mysql/plugin/daemon_example.ini /usr/lib64/mysql/plugin/daemon_example.ini
-/usr/lib64/mysql/plugin/dialog.so 
 /usr/lib64/mysql/plugin/dialog_examples.so /usr/lib64/mysql/plugin/dialog_examples.so
 /usr/lib64/mysql/plugin/ha_innodb.so /usr/lib64/mysql/plugin/ha_innodb.so
Zeile 89: Zeile 89:
 /usr/lib64/mysql/plugin/libdaemon_example.so /usr/lib64/mysql/plugin/libdaemon_example.so
 /usr/lib64/mysql/plugin/mypluglib.so /usr/lib64/mysql/plugin/mypluglib.so
-/usr/lib64/mysql/plugin/mysql_clear_password.so 
 /usr/lib64/mysql/plugin/qa_auth_client.so /usr/lib64/mysql/plugin/qa_auth_client.so
 /usr/lib64/mysql/plugin/qa_auth_interface.so /usr/lib64/mysql/plugin/qa_auth_interface.so
Zeile 147: Zeile 146:
 /var/log/mariadb /var/log/mariadb
 /var/log/mariadb/mariadb.log /var/log/mariadb/mariadb.log
-/var/run/mariadb +/var/run/mariadb</code>
-</code>+
  
 ===== Konfiguration ===== ===== Konfiguration =====
Zeile 177: Zeile 175:
 Zusätzliche Beispiele finden sich übrigens auch im Verzeichnis //**/usr/share/mysql/**//. Zusätzliche Beispiele finden sich übrigens auch im Verzeichnis //**/usr/share/mysql/**//.
    # ll /usr/share/mysql/*.cnf    # ll /usr/share/mysql/*.cnf
-<code>-rw-r--r--. 1 root root  4920 Feb  5 15:44 /usr/share/mysql/my-huge.cnf +<code>-rw-r--r--. 1 root root  4920 Nov 15 00:14 /usr/share/mysql/my-huge.cnf 
--rw-r--r--. 1 root root 20438 Feb  5 15:44 /usr/share/mysql/my-innodb-heavy-4G.cnf +-rw-r--r--. 1 root root 20438 Nov 15 00:14 /usr/share/mysql/my-innodb-heavy-4G.cnf 
--rw-r--r--. 1 root root  4907 Feb  5 15:44 /usr/share/mysql/my-large.cnf +-rw-r--r--. 1 root root  4907 Nov 15 00:14 /usr/share/mysql/my-large.cnf 
--rw-r--r--. 1 root root  4920 Feb  5 15:44 /usr/share/mysql/my-medium.cnf +-rw-r--r--. 1 root root  4920 Nov 15 00:14 /usr/share/mysql/my-medium.cnf 
--rw-r--r--. 1 root root  2846 Feb  5 15:44 /usr/share/mysql/my-small.cnf+-rw-r--r--. 1 root root  2846 Nov 15 00:14 /usr/share/mysql/my-small.cnf
 </code> </code>
  
Zeile 194: Zeile 192:
 ==== erster Start ==== ==== erster Start ====
 Nun ist es an der Zeit unseren Datenbank-Server das erste mal zu starten. Nun ist es an der Zeit unseren Datenbank-Server das erste mal zu starten.
-   # systemctl start mariadb+   # systemctl start mariadb.service
  
 Der Start wird im Logfile des Datenbankservers //**/var/log/mariadb/mariadb.log**// entsprechend dokumentiert. Der Start wird im Logfile des Datenbankservers //**/var/log/mariadb/mariadb.log**// entsprechend dokumentiert.
    # less /var/log/mariadb/mariadb.log    # less /var/log/mariadb/mariadb.log
-<code>150307 22:10:14 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql/data +<code>170220 18:25:10 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 
-150307 22:10:14 InnoDB: The InnoDB memory heap is disabled +170220 18:25:10 [Note] /usr/libexec/mysqld (mysqld 5.5.52-MariaDB) starting as process 3256 ... 
-150307 22:10:14 InnoDB: Mutexes and rw_locks use GCC atomic builtins +170220 18:25:10 InnoDB: The InnoDB memory heap is disabled 
-150307 22:10:14 InnoDB: Compressed tables use zlib 1.2.7 +170220 18:25:10 InnoDB: Mutexes and rw_locks use GCC atomic builtins 
-150307 22:10:14 InnoDB: Using Linux native AIO +170220 18:25:10 InnoDB: Compressed tables use zlib 1.2.7 
-150307 22:10:14 InnoDB: Initializing buffer pool, size = 128.0M +170220 18:25:10 InnoDB: Using Linux native AIO 
-150307 22:10:14 InnoDB: Completed initialization of buffer pool+170220 18:25:10 InnoDB: Initializing buffer pool, size = 128.0M 
 +170220 18:25:10 InnoDB: Completed initialization of buffer pool
 InnoDB: The first specified data file ./ibdata1 did not exist: InnoDB: The first specified data file ./ibdata1 did not exist:
 InnoDB: a new database to be created! InnoDB: a new database to be created!
-150307 22:10:14  InnoDB: Setting file ./ibdata1 size to 10 MB+170220 18:25:10  InnoDB: Setting file ./ibdata1 size to 10 MB
 InnoDB: Database physically writes the file full: wait... InnoDB: Database physically writes the file full: wait...
-150307 22:10:14  InnoDB: Log file ./ib_logfile0 did not exist: new to be created+170220 18:25:10  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
 InnoDB: Setting log file ./ib_logfile0 size to 5 MB InnoDB: Setting log file ./ib_logfile0 size to 5 MB
 InnoDB: Database physically writes the file full: wait... InnoDB: Database physically writes the file full: wait...
-150307 22:10:14  InnoDB: Log file ./ib_logfile1 did not exist: new to be created+170220 18:25:10  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
 InnoDB: Setting log file ./ib_logfile1 size to 5 MB InnoDB: Setting log file ./ib_logfile1 size to 5 MB
 InnoDB: Database physically writes the file full: wait... InnoDB: Database physically writes the file full: wait...
Zeile 220: Zeile 219:
 InnoDB: Creating foreign key constraint system tables InnoDB: Creating foreign key constraint system tables
 InnoDB: Foreign key constraint system tables created InnoDB: Foreign key constraint system tables created
-150307 22:10:15  InnoDB: Waiting for the background threads to start +170220 18:25:11  InnoDB: Waiting for the background threads to start 
-150307 22:10:16 Percona XtraDB (http://www.percona.com) 5.5.40-MariaDB-36.started; log sequence number 0 +170220 18:25:12 Percona XtraDB (http://www.percona.com) 5.5.49-MariaDB-38.started; log sequence number 0 
-150307 22:10:16 [Note] Plugin 'FEEDBACK' is disabled. +170220 18:25:12 [Note] Plugin 'FEEDBACK' is disabled. 
-150307 22:10:16 [Note] Server socket created on IP: '0.0.0.0'+170220 18:25:12 [Note] Server socket created on IP: '0.0.0.0'
-150307 22:10:16 [Note] Event Scheduler: Loaded 0 events +170220 18:25:12 [Note] Event Scheduler: Loaded 0 events 
-150307 22:10:16 [Note] /usr/libexec/mysqld: ready for connections. +170220 18:25:12 [Note] /usr/libexec/mysqld: ready for connections. 
-Version: '5.5.41-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server+Version: '5.5.52-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server
 </code> </code>
  
Zeile 247: Zeile 246:
  
 Möchten wir überprüfen, ob der MariaDB-Server läuft, haben wir mehrere Möglichkeiten. Möchten wir überprüfen, ob der MariaDB-Server läuft, haben wir mehrere Möglichkeiten.
-  - **systemctl** \\ <code> # systemctl status mariadb -l</code><code>mariadb.service - MariaDB database server +  - **systemctl** \\ <code> # systemctl status mariadb -l</code> <html><pre class="code"> 
-   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled) +<font style="color: rgb(0, 255, 0)"><b>● </b></font><font style="color: rgb(0, 0, 0)">mariadb.service - MariaDB database server 
-   Active: active (running) since Sat 2015-03-07 22:10:17 CET; 27min ago +   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled) 
-  Process: 27040 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS) +   Active: <font style="color: rgb(0, 255, 0)"><b>active (running) </b></font><font style="color: rgb(0, 0, 0)">since Mon 2017-02-20 18:25:12 CET; 1min 6s ago 
-  Process: 26961 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS) +  Process: 3099 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS) 
- Main PID: 27039 (mysqld_safe)+  Process: 3019 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS) 
 + Main PID: 3098 (mysqld_safe)
    CGroup: /system.slice/mariadb.service    CGroup: /system.slice/mariadb.service
-           ├─27039 /bin/sh /usr/bin/mysqld_safe --basedir=/usr +           ├─3098 /bin/sh /usr/bin/mysqld_safe --basedir=/usr 
-           └─27198 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql/data --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/run/mariadb/mariadb.pid --socket=/var/lib/mysql/mysql.sock+           └─3256 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/run/mariadb/mariadb.pid --socket=/var/lib/mysql/mysql.sock
  
-Mar 07 22:10:13 vml000117.dmz.nausch.org mariadb-prepare-db-dir[26961]: The latest information about MariaDB is available at http://mariadb.org/. +Feb 20 18:25:10 vml000117.dmz.nausch.org mariadb-prepare-db-dir[3019]: To start mysqld at boot time you have to copy 
-Mar 07 22:10:13 vml000117.dmz.nausch.org mariadb-prepare-db-dir[26961]: You can find additional information about the MySQL part at: +Feb 20 18:25:10 vml000117.dmz.nausch.org mariadb-prepare-db-dir[3019]: support-files/mysql.server to the right place for your system 
-Mar 07 22:10:13 vml000117.dmz.nausch.org mariadb-prepare-db-dir[26961]: http://dev.mysql.com +Feb 20 18:25:10 vml000117.dmz.nausch.org mariadb-prepare-db-dir[3019]: PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER ! 
-Mar 07 22:10:13 vml000117.dmz.nausch.org mariadb-prepare-db-dir[26961]: Support MariaDB development by buying support/new features from MariaDB +Feb 20 18:25:10 vml000117.dmz.nausch.org mariadb-prepare-db-dir[3019]: To do so, start the server, then issue the following commands: 
-Mar 07 22:10:13 vml000117.dmz.nausch.org mariadb-prepare-db-dir[26961]: Corporation Ab. You can contact us about this at sales@mariadb.com. +Feb 20 18:25:10 vml000117.dmz.nausch.org mariadb-prepare-db-dir[3019]: '/usr/bin/mysqladmin' -u root password 'new-password' 
-Mar 07 22:10:13 vml000117.dmz.nausch.org mariadb-prepare-db-dir[26961]: Alternatively consider joining our community based development effort: +Feb 20 18:25:10 vml000117.dmz.nausch.org mariadb-prepare-db-dir[3019]: '/usr/bin/mysqladmin' -u root -h vml000117.dmz.nausch.org password 'new-password' 
-Mar 07 22:10:13 vml000117.dmz.nausch.org mariadb-prepare-db-dir[26961]: http://mariadb.com/kb/en/contributing-to-the-mariadb-project/ +Feb 20 18:25:10 vml000117.dmz.nausch.org mariadb-prepare-db-dir[3019]: Alternatively you can run
-Mar 07 22:10:14 vml000117.dmz.nausch.org mysqld_safe[27039]: 150307 22:10:14 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'+Feb 20 18:25:10 vml000117.dmz.nausch.org mysqld_safe[3098]: 170220 18:25:10 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'
-Mar 07 22:10:14 vml000117.dmz.nausch.org mysqld_safe[27039]: 150307 22:10:14 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql +Feb 20 18:25:10 vml000117.dmz.nausch.org mysqld_safe[3098]: 170220 18:25:10 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 
-Mar 07 22:10:17 vml000117.dmz.nausch.org systemd[1]: Started MariaDB database server.</code>+Feb 20 18:25:12 vml000117.dmz.nausch.org systemd[1]: Started MariaDB database server.</font> 
 +</pre></html>
   - **ps** \\ <code> # ps aux | grep mysql</code><code>mysql    27039  0.0  0.1 115344  1620 ?        Ss   22:10   0:00 /bin/sh /usr/bin/mysqld_safe --basedir=/usr   - **ps** \\ <code> # ps aux | grep mysql</code><code>mysql    27039  0.0  0.1 115344  1620 ?        Ss   22:10   0:00 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
 mysql    27198  0.0  8.3 905348 84784 ?        Sl   22:10   0:01 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql/data --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/run/mariadb/mariadb.pid --socket=/var/lib/mysql/mysql.sock mysql    27198  0.0  8.3 905348 84784 ?        Sl   22:10   0:01 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql/data --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/run/mariadb/mariadb.pid --socket=/var/lib/mysql/mysql.sock
Zeile 720: Zeile 721:
 ==== Datenbank-Dump ==== ==== Datenbank-Dump ====
 Zur Sicherung unserer MariaDB-Tabellen legen wir uns ein kleines Script an, mit dessen Hilfe wir täglich eine Sicherung der kompletten Datenbank vornehmen können. Zur Sicherung unserer MariaDB-Tabellen legen wir uns ein kleines Script an, mit dessen Hilfe wir täglich eine Sicherung der kompletten Datenbank vornehmen können.
-   # touch /root/bin/mysql_fulldump+   # touch /root/bin/mariadb_fulldump
  
 Damit das Script später auch nur vom User **root** gelesen udn ausgeführt werden kann, setzen wir noch kurz die Dateirechte entsprechend. Damit das Script später auch nur vom User **root** gelesen udn ausgeführt werden kann, setzen wir noch kurz die Dateirechte entsprechend.
-   # chmod 700 /root/bin/mysql_fulldump+   # chmod 700 /root/bin/mariadb_fulldump
  
 Nun efüllen wir noch unser Script. Nun efüllen wir noch unser Script.
-   # vim /root/bin/mysql_fulldump +   # vim /root/bin/mariadb_fulldump 
-<file bash /root/bin/mysql_fulldump>#!/bin/bash+<file bash /root/bin/mariadb_fulldump>#!/bin/bash
  
 ################################################################################## ##################################################################################
 # Script-Name : mysqldump.sh                                                     #  # Script-Name : mysqldump.sh                                                     # 
 # Description : Datenbank-Dump der kompletten (alle Tabellen) unserer            # # Description : Datenbank-Dump der kompletten (alle Tabellen) unserer            #
-#               MySQL-Datenbank nach /root/mysql/dumps                           #+#               MariaDB nach /root/mysql/dumps                                   #
 #               Drei Datensicherungen werden aufgehoben, ältere werden gelöscht. #  #               Drei Datensicherungen werden aufgehoben, ältere werden gelöscht. # 
 #                                                                                #  #                                                                                # 
Zeile 757: Zeile 758:
  
 # Script-Name. # Script-Name.
-SCRIPT_NAME='mysqldump'+SCRIPT_NAME='mariadb_fulldump'
  
 # Backup-Verzeichnis. # Backup-Verzeichnis.
Zeile 832: Zeile 833:
 log "" log ""
 log "+-------------------------------------------------------------------------------+" log "+-------------------------------------------------------------------------------+"
-log "| .................... Start des MySQL-Datenbank-Dumps ........................ |"+log "........................ Start des MariaDB-Dumps ............................ |"
 log "+-------------------------------------------------------------------------------+" log "+-------------------------------------------------------------------------------+"
 log "" log ""
Zeile 985: Zeile 986:
 # Finish syncing. # Finish syncing.
 log "+-------------------------------------------------------------------------------+" log "+-------------------------------------------------------------------------------+"
-log "| ..................... Ende des MySQL-Datenbank-Dumps ........................ |"+log ".......................... Ende des MariaDB-Dumps ........................... |"
 log "+-------------------------------------------------------------------------------+" log "+-------------------------------------------------------------------------------+"
 log "" log ""
Zeile 998: Zeile 999:
  
 exit 0 exit 0
-</file+</file
 + 
 + 
 +Anschließend tragen wir noch in der Datei **/etc/crontab** ein, daß das Script täglich um 3:20 Uhr laufen soll. 
 +   # vim /etc/crontab 
 + 
 +<file bash /etc/crontab>SHELL=/bin/bash 
 +PATH=/sbin:/bin:/usr/sbin:/usr/bin 
 +MAILTO=root 
 +HOME=/ 
 + 
 +# For details see man 4 crontabs 
 + 
 +# Example of job definition: 
 +# .---------------- minute (0 - 59) 
 +# |  .------------- hour (0 - 23) 
 +# |  |  .---------- day of month (1 - 31) 
 +# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ... 
 +# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat 
 +# |  |  |  |  | 
 +# *  *  *  *  * user-name command to be executed 
 + 
 +# Django: 2013-05-13 täglicher MariaDB-Datenbankdump 
 +20  3  *  *  root /root/bin/mariadb_fulldump 1>/dev/null 2>&
 + 
 +</file> 
 + 
 +==== phpMyAdmin ==== 
 +Zur komfortablen Administration unserer [[centos:mariadb|MariaDB unter CentOS 7.x]] greifen wir auf das PHP-Projekt [[http://phpmyadmin.sourceforge.net/|phpMyAdmin]] zurück. Im Kapitel [[centos:web_c7:phpmyadmin|phpMyAdmin unter CentOS 7.x installieren und einrichten]] ist die Installation und Konfiguration des PHP Projektes unter CentOS 7.x beschrieben. 
 + 
 +====== Links ====== 
 +  * **[[wiki:start|Zurück zu Projekte und Themenkapitel]]** 
 +  * **[[http://dokuwiki.nausch.org/doku.php/|Zurück zur Startseite]]** 
 + 
  • centos/mariadb.1425773589.txt.gz
  • Zuletzt geändert: 08.03.2015 00:13.
  • von django