| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| servers:windows:mariadb [2026/01/24 08:02] – [Script] Sean Rhone | servers:windows:mariadb [2026/04/15 09:51] (current) – [Block] Sean Rhone |
|---|
| ====== MariaDB ====== | ====== MariaDB ====== |
| |
| ===== 12.2 ===== | ===== 12.3 ===== |
| |
| * https://mariadb.org/download/ | * https://mariadb.org/download/ |
| * http://downloads.mariadb.org/mariadb/12.2.1/ | * https://mariadb.org/mariadb/all-releases/ |
| |
| * Last tested: ''mariadb-12.2.1-winx64.msi'' | * Last tested: ''mariadb-12.3.1-winx64.msi'' |
| | |
| * No Development components or Third party tools | |
| * Use UTF8 as default server's character set | |
| |
| ===== Install Options ===== | ===== Install Options ===== |
| ====== Firewall ====== | ====== Firewall ====== |
| |
| "netsh.exe" advfirewall firewall delete rule name="MariaDB 12.2 (x64)" | ===== Delete Default Rule ===== |
| |
| CD "%ProgramFiles%\MariaDB "*"\bin" && "netsh.exe" advfirewall firewall add rule name="MariaDB Server" dir="in" action="block" profile="any" program="%CD%\mysqld.exe" | **** |
| | |
| | "%SystemRoot%\System32\netsh.exe" advfirewall firewall delete rule name="MariaDB 12.3 (x64)" |
| | |
| | ===== Block ===== |
| | |
| | * [[servers;windows;nginx;friendica#firewall|Friendica]] with WSL needs ''remoteip=localsubnet'' |
| | |
| | CD "%ProgramFiles%\MariaDB "*"\bin" |
| | |
| | "%SystemRoot%\System32\netsh.exe" advfirewall firewall add rule name="MariaDB Server" dir="in" action="block" profile="any" program="%CD%\mysqld.exe" |
| |
| ===== Delete Rule ===== | ===== Delete Rule ===== |
| **** | **** |
| |
| "netsh.exe" advfirewall firewall delete rule name="MariaDB Server" | "%SystemRoot%\System32\netsh.exe" advfirewall firewall delete rule name="MariaDB Server" |
| |
| ====== Maintenance ====== | ====== Maintenance ====== |
| ==== Create User ==== | ==== Create User ==== |
| |
| "%ProgramFiles%\MariaDB 12.2\bin\mariadb.exe" -u "root" | "%ProgramFiles%\MariaDB 12.3\bin\mariadb.exe" -u "root" |
| |
| CREATE USER 'maintenance'@'localhost' IDENTIFIED BY 'x'; | CREATE USER 'maintenance'@'localhost' IDENTIFIED BY 'x'; |
| * :!: Change ''--password'' | * :!: Change ''--password'' |
| |
| MKDIR "%SystemDrive%\www\scripts\mariadb" & "notepad.exe" "%SystemDrive%\www\scripts\mariadb\Maintenance.bat" | MKDIR "%SystemDrive%\www\scripts\mariadb" & "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\scripts\mariadb\Maintenance.bat" |
| |
| <code> | <code> |
| CD "%Temp%" | CD "%Temp%" |
| |
| "%ProgramFiles%\MariaDB 12.2\bin\mariadb-check.exe" --user="maintenance" --password="x" -o -A -f -e --auto-repair | "%ProgramFiles%\MariaDB 12.3\bin\mariadb-check.exe" --user="maintenance" --password="x" -o -A -f -e --auto-repair |
| |
| :: End</code> | :: End</code> |
| * Weekly (Sunday) ''07:10:00 AM'' | * Weekly (Sunday) ''07:10:00 AM'' |
| |
| SCHTASKS /Create /SC "WEEKLY" /D "SUN" /TN "DB Maintenance" /TR "%SystemDrive%\www\scripts\mariadb\Maintenance.bat" /ST "07:10" /F | "%SystemRoot%\System32\schtasks.exe" /Create /SC "WEEKLY" /D "SUN" /TN "DB Maintenance" /TR "%SystemDrive%\www\scripts\mariadb\Maintenance.bat" /ST "07:10" /F |
| | |
| ===== One-shot ===== | |
| | |
| "%ProgramFiles%\MariaDB 12.2\bin\mariadbd.exe" --defaults-file="%ProgramFiles%\MariaDB 12.2\data\my.ini" | |
| | |
| "%ProgramFiles%\MariaDB 12.2\bin\mariadb-check.exe" -u "root" -o -A -f -e --auto-repair | |
| |