User Tools

Site Tools


servers:bsd: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:bsd:mariadb [2024/10/03 01:29] Sean Rhoneservers:bsd:mariadb [2026/01/09 17:24] (current) – [Script] Sean Rhone
Line 1: Line 1:
 +====== Information ======
 +
 +  * MariaDB ((https://mariadb.org/))
 +  * Server
 +  * [[information:realm_of_espionage|Realm of Espionage]]
 +
 +===== Prerequisites =====
 +
 +  * [[bsd:server:freebsd_16.0|FreeBSD 16.0]]
 +
 +====== Dependencies ======
 +
 +  su -
 +
 +  pkg install 'mariadb118-server'
 +
 ====== Settings ====== ====== Settings ======
 +
 +  su -
  
   ee '/usr/local/etc/mysql/conf.d/custom.cnf'   ee '/usr/local/etc/mysql/conf.d/custom.cnf'
Line 17: Line 35:
 expire_logs_days = '7' expire_logs_days = '7'
 max_binlog_size = '100M' max_binlog_size = '100M'
-skip-networking = 'On+skip-networking = 'Off
-table_definition_cache = '1400'</code>+table_definition_cache = '1400'
  
 +# End</code>
  
-  * TODO (copy of mysql)+====== Service ======
  
-<code> +===== Initial =====
-root@Spinesnap:~ # service 'mysql-server' start +
-Installing MariaDB/MySQL system tables in '/var/db/mysql' ... +
-OK+
  
-To start mariadbd at boot time you have to copy +  su -
-support-files/mariadb.service to the right place for your system+
  
 +  sysrc mysql_enable="YES"
  
-Two all-privilege accounts were created. +  service 'mysql-serverstart
-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 root@localhost, it has no password either, but +
-you need to be the system 'rootuser 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+===== Status =====
  
-You can start the MariaDB daemon with: +  su -
-cd '/usr/local' ; /usr/local/bin/mariadbd-safe --datadir='/var/db/mysql'+
  
-You can test the MariaDB daemon with mariadb-test-run.pl +  service 'mysql-serverstatus
-cd '/usr/local/' ; perl mariadb-test-run.pl+
  
-Please report any problems at https://mariadb.org/jira+====== Initial Setup ======
  
-The latest information about MariaDB is available at https://mariadb.org/.+  su -
  
-Consider joining MariaDB's strong and vibrant community: +  mariadb-secure-installation
-https://mariadb.org/get-involved/+
  
-Starting mysql. +====== Database Repair and Optimization ======
-</code>+
  
-  service 'mysql-server' status+===== One-shot =====
  
-  sysrc mysql_enable="YES"+  su -
  
-  service 'mysql-server' start+  mariadb-check -o -A -f -e --auto-repair
  
-  mysql_secure_installation+===== cron =====
  
-  mysqladmin+==== Script ====
  
-  mysqlcheck -'root-p -o -A -f -e --auto-repair+  mkdir -p ~/'.local/scripts/mariadb' && ee ~/'.local/scripts/mariadb/optimize.sh' && chmod +x ~/'.local/scripts/mariadb/optimize.sh'
  
-  mysqladmin -u 'root' -p variables | egrep 'utf8|networking|socket'+<code> 
 +#!/bin/sh
  
-  /tmp/mysql.sock+'/usr/local/bin/mariadb-check' -o -A -f -e --auto-repair > '/dev/null'
  
-  /tmp/mysqlx.sock+'/bin/sync'
  
-====== Install Notes ======+# End</code> 
 + 
 +  su 'root' -c ~/'.local/scripts/mariadb/optimize.sh' 
 + 
 +==== cron ==== 
 + 
 +  * Weekly (Sunday) ''07:10:00 AM'' 
 + 
 +  su - 
 + 
 +  ee '/etc/cron.d/mariadb-optimize'
  
 <code> <code>
-===== +
-Message from mariadb114-server-11.4.2:+SHELL=/bin/sh 
 + 
 +10 7 * * sun root '/home/espionage724/.local/scripts/mariadb/optimize.sh' 
 + 
 +# End</code> 
 + 
 +====== Notable Commands ====== 
 + 
 +===== Binaries ===== 
 + 
 +  pkg info -l 'mariadb118-server' | grep 'bin' 
 + 
 +  pkg info -l 'mariadb118-client' | grep 'bin' 
 + 
 +===== Settings ===== 
 + 
 +  su - 
 + 
 +  mariadb-admin variables | egrep 'utf8|networking|socket' 
 + 
 +===== Show Users on Server ===== 
 + 
 +  su -
  
--- +  mariadb
-MariaDB respects hier(7) and doesn't check /etc and /etc/mysql for +
-my.cnf. Please move existing my.cnf files from those paths to +
-/usr/local/etc/mysql or /usr/local/etc. Sample +
-configuration files are provided in /usr/local/etc/mysql +
-and /usr/local/etc/mysql/conf.d. +
-The rc(8) script no longer uses /var/db/mysql/my.cnf for configuration +
-nor /var/db/mysql for logs and PID-file.+
  
-This port does NOT include the mytop perl scriptthis is included in +  select User,Host from mysql.user;
-the MariaDB tarball but the most recent version can be found in the +
-databases/mytop port+
  
-Using wsrep clustering requires adding a configuration file. 
-Copy /usr/local/etc/mysql/conf.d/wsrep.conf.sample to 
-/usr/local/etc/mysql/conf.d/wsrep.conf and change what you need there. 
-</code> 
C:/www/wiki/data/attic/servers/bsd/mariadb.1727933398.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