User Tools

Site Tools


servers:linux:mariadb

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
servers:linux:mariadb [2025/08/27 20:00] Sean Rhoneservers:linux:mariadb [2026/04/30 23:49] (current) – [Service] Sean Rhone
Line 1: Line 1:
 ====== Information ====== ====== Information ======
  
-  * MariaDB ((https://mariadb.org/about))+  * MariaDB 
 +  * Server
   * [[Information:Realm of Espionage]]   * [[Information:Realm of Espionage]]
  
Line 32: Line 33:
  
 # End</code> # End</code>
- 
-==== Verify ===== 
- 
-**** 
- 
-  sudo mariadb-admin variables | egrep 'utf8|networking|socket' 
  
 ====== Dependencies ====== ====== Dependencies ======
Line 47: Line 42:
 ====== Initial Setup ====== ====== Initial Setup ======
  
-****+  Change the root password?: ''n''
  
   sudo systemctl enable 'mariadb' --now && sudo mariadb-secure-installation   sudo systemctl enable 'mariadb' --now && sudo mariadb-secure-installation
Line 61: Line 56:
 ===== Service ===== ===== Service =====
  
-==== Create MySQL User ====+==== Create User ====
  
   sudo mariadb   sudo mariadb
Line 69: Line 64:
   GRANT SELECT, INSERT ON *.* to 'maintenance'@'localhost';   GRANT SELECT, INSERT ON *.* to 'maintenance'@'localhost';
  
-  FLUSH PRIVILEGES; +  FLUSH PRIVILEGES;EXIT;
- +
-  EXIT+
  
 ==== Authentication File ==== ==== Authentication File ====
  
-  sudo mkdir -p '/var/lib/mysql/auth' && sudo -e '/var/lib/mysql/auth/maintenance' && sudo chown -v -R 'mysql':'mysql' '/var/lib/mysql/auth' && sudo chmod -v '600' '/var/lib/mysql/auth/maintenance'+  sudo mkdir -p '/var/lib/mysql/auth' && sudo -e '/var/lib/mysql/auth/maintenance' && sudo chown 'mysql':'mysql' '/var/lib/mysql/auth/maintenance' && sudo chmod '0600' '/var/lib/mysql/auth/maintenance'
  
 <code> <code>
Line 93: Line 86:
 Group=mysql Group=mysql
 Type=oneshot Type=oneshot
 +
 +WorkingDirectory=/tmp
 +
 ExecStart='/usr/bin/mariadb-check' --defaults-extra-file='/var/lib/mysql/auth/maintenance' --optimize --all-databases --force --extended --auto-repair ExecStart='/usr/bin/mariadb-check' --defaults-extra-file='/var/lib/mysql/auth/maintenance' --optimize --all-databases --force --extended --auto-repair
-ExecStartPost='/usr/bin/sync' 
  
 # End</code> # End</code>
Line 100: Line 95:
 ==== Timer ==== ==== Timer ====
  
-  * Weekly+  * Weekly (Sunday) ''07:10:00 AM''
  
-  sudo -e '/etc/systemd/system/db-m.timer' && sudo systemctl daemon-reload && sudo systemctl enable 'db-m.timer' --now && sudo systemctl start 'db-m' && sudo systemctl status 'db-m' -l+  sudo -e '/etc/systemd/system/db-m.timer' && sudo systemctl daemon-reload && sudo systemctl enable 'db-m.timer' --now
  
 <code> <code>
Line 110: Line 105:
  
 [Timer] [Timer]
-OnCalendar=weekly+OnCalendar=Sun *-*-* 07:10:00
 Persistent=true Persistent=true
  
Line 117: Line 112:
  
 # End</code> # End</code>
 +
 +  sudo systemctl start 'db-m' && sudo systemctl status 'db-m' -l
  
 ====== Notable Commands ====== ====== Notable Commands ======
 +
 +===== Settings =====
 +
 +****
 +
 +  sudo mariadb-admin variables | egrep 'utf8|networking|socket'
  
 ===== Show Users on Server ===== ===== Show Users on Server =====
/srv/www/wiki/data/attic/servers/linux/mariadb.1756339257.txt.gz · Last modified: by Sean Rhone

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki