<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>code &amp;mdash; Epic Worlds</title>
    <link>https://itwasntme223.writeas.com/tag:code</link>
    <description>The official blog of Jonathan Snyder, the muse&#39;s bitch. </description>
    <pubDate>Sun, 19 Apr 2026 23:51:12 +0000</pubDate>
    <image>
      <url>https://i.snap.as/Ma5Uxu3U.png</url>
      <title>code &amp;mdash; Epic Worlds</title>
      <link>https://itwasntme223.writeas.com/tag:code</link>
    </image>
    <item>
      <title>Maria DB and the Mysterious Column Storage Engine</title>
      <link>https://itwasntme223.writeas.com/maria-db-and-the-mysterious-column-storage-engine-nnd0?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[Tags: #infosec #code&#xA;&#xA;Not much of a preamble for this one. My friend was struggling getting Postgresql to work with a column storage engine because the directions were opaque and useless. I started helping her out but discovered that MariaDB is the same way. After a day or two of research, I wrote a bash script that does the install of everything and when I tested it on my own machine, it worked! &#xA;&#xA;NOTE: This script is written and tested on an Ubuntu machine. You may have to tweak it for others. &#xA;&#xA;!/usr/bin/env bash&#xA;&#xA;set -e&#xA;exec 2  error.log&#xA;&#xA;logerror() {&#xA;    echo &#34;$(date &#39;+%Y-%m-%d %H:%M:%S&#39;) ERROR: $1&#34; | tee -a error.log&#xA;}&#xA;&#xA;trap &#39;kill $SUDOPID&#39; EXIT&#xA;&#xA;echo &#34;This script will install MariaDB and the MariaDB extension Column Store.&#34;&#xA;echo &#34;Do you wish to proceed? (Y/N)&#34; &#xA;&#xA;read -r proceedtime&#xA;&#xA;if [[ &#34;${proceedtime^^}&#34; != &#34;Y&#34; ]]; then&#xA;    echo &#34;Exiting script...&#34;&#xA;    exit 1&#xA;fi&#xA;&#xA;echo &#34;Starting installation of MariaDB...&#34;&#xA;&#xA;Check sudo access&#xA;if ! sudo -v; then &#xA;    logerror &#34;Sudo access denied. Exiting.&#34;&#xA;    exit 1&#xA;fi &#xA;&#xA;Keep sudo alive in the background&#xA;( while true; do sudo -v; sleep 60; done ) &amp; &#xA;SUDOPID=$!&#xA;&#xA;Update package lists&#xA;if ! sudo apt update; then&#xA;    logerror &#34;Failed to update package lists.&#34;&#xA;    exit 1&#xA;fi&#xA;&#xA;Install MariaDB&#xA;if sudo apt install -y mariadb-server mariadb-client; then &#xA;    if systemctl is-active --quiet mariadb; then&#xA;        echo &#34;MariaDB server installed and running.&#34;&#xA;    else&#xA;        logerror &#34;MariaDB server installation failed or not running.&#34;&#xA;        exit 1&#xA;    fi&#xA;else&#xA;    logerror &#34;Failed to install MariaDB.&#34;&#xA;    exit 1&#xA;fi&#xA;&#xA;Prepare to install ColumnStore&#xA;echo &#34;Preparing to install the MariaDB ColumnStore engine.&#34; &#xA;&#xA;mkdir -p columnstore&#xA;pushd columnstore || exit 1&#xA;&#xA;Download and set up the MariaDB repo&#xA;if ! wget -q --show-progress https://downloads.mariadb.com/MariaDB/mariadbreposetup; then&#xA;    logerror &#34;Failed to download mariadbreposetup.&#34;&#xA;    exit 1&#xA;fi&#xA;&#xA;chmod +x mariadbreposetup&#xA;&#xA;if ! sudo ./mariadbreposetup --mariadb-server-version=&#34;mariadb-10.6&#34;; then &#xA;    logerror &#34;Failed to install Maria Repo.&#34;&#xA;    exit 1 &#xA;fi &#xA;&#xA;Update package lists again&#xA;if ! sudo apt update; then&#xA;    logerror &#34;Failed to update package lists after adding MariaDB repo.&#34;&#xA;    exit 1&#xA;fi&#xA;&#xA;Install ColumnStore dependencies&#xA;if ! sudo apt install -y libjemalloc2 mariadb-backup libmariadb3 mariadb-plugin-columnstore; then &#xA;    logerror &#34;Failed to install ColumnStore dependencies.&#34;&#xA;    exit 1&#xA;fi &#xA;&#xA;Verify ColumnStore installation&#xA;if ! sudo mariadb -e &#34;SHOW PLUGINS&#34; | grep -q &#34;COLUMNSTORE&#34;; then&#xA;    logerror &#34;ColumnStore plugin installation failed.&#34;&#xA;    exit 1&#xA;fi&#xA;&#xA;service mariadb restart&#xA;&#xA;popd&#xA;&#xA;echo &#34;Installation complete.&#34;&#xA;`]]&gt;</description>
      <content:encoded><![CDATA[<p>Tags: <a href="https://itwasntme223.writeas.com/tag:infosec" class="hashtag"><span>#</span><span class="p-category">infosec</span></a> <a href="https://itwasntme223.writeas.com/tag:code" class="hashtag"><span>#</span><span class="p-category">code</span></a></p>

<p>Not much of a preamble for this one. My friend was struggling getting Postgresql to work with a column storage engine because the directions were opaque and useless. I started helping her out but discovered that MariaDB is the same way. After a day or two of research, I wrote a bash script that does the install of everything and when I tested it on my own machine, it worked!</p>

<p><em>NOTE: This script is written and tested on an Ubuntu machine. You may have to tweak it for others.</em></p>

<pre><code>#!/usr/bin/env bash

set -e
exec 2&gt;error.log

log_error() {
    echo &#34;$(date &#39;+%Y-%m-%d %H:%M:%S&#39;) ERROR: $1&#34; | tee -a error.log
}

trap &#39;kill $SUDO_PID&#39; EXIT

echo &#34;This script will install MariaDB and the MariaDB extension Column Store.&#34;
echo &#34;Do you wish to proceed? (Y/N)&#34; 

read -r proceed_time

if [[ &#34;${proceed_time^^}&#34; != &#34;Y&#34; ]]; then
    echo &#34;Exiting script...&#34;
    exit 1
fi

echo &#34;Starting installation of MariaDB...&#34;

# Check sudo access
if ! sudo -v; then 
    log_error &#34;Sudo access denied. Exiting.&#34;
    exit 1
fi 

# Keep sudo alive in the background
( while true; do sudo -v; sleep 60; done ) &amp; 
SUDO_PID=$!

# Update package lists
if ! sudo apt update; then
    log_error &#34;Failed to update package lists.&#34;
    exit 1
fi

# Install MariaDB
if sudo apt install -y mariadb-server mariadb-client; then 
    if systemctl is-active --quiet mariadb; then
        echo &#34;MariaDB server installed and running.&#34;
    else
        log_error &#34;MariaDB server installation failed or not running.&#34;
        exit 1
    fi
else
    log_error &#34;Failed to install MariaDB.&#34;
    exit 1
fi

# Prepare to install ColumnStore
echo &#34;Preparing to install the MariaDB ColumnStore engine.&#34; 

mkdir -p columnstore
pushd columnstore || exit 1

# Download and set up the MariaDB repo
if ! wget -q --show-progress https://downloads.mariadb.com/MariaDB/mariadb_repo_setup; then
    log_error &#34;Failed to download mariadb_repo_setup.&#34;
    exit 1
fi

chmod +x mariadb_repo_setup

if ! sudo ./mariadb_repo_setup --mariadb-server-version=&#34;mariadb-10.6&#34;; then 
    log_error &#34;Failed to install Maria Repo.&#34;
    exit 1 
fi 

# Update package lists again
if ! sudo apt update; then
    log_error &#34;Failed to update package lists after adding MariaDB repo.&#34;
    exit 1
fi

# Install ColumnStore dependencies
if ! sudo apt install -y libjemalloc2 mariadb-backup libmariadb3 mariadb-plugin-columnstore; then 
    log_error &#34;Failed to install ColumnStore dependencies.&#34;
    exit 1
fi 

# Verify ColumnStore installation
if ! sudo mariadb -e &#34;SHOW PLUGINS&#34; | grep -q &#34;COLUMNSTORE&#34;; then
    log_error &#34;ColumnStore plugin installation failed.&#34;
    exit 1
fi

service mariadb restart

popd

echo &#34;Installation complete.&#34;
</code></pre>
]]></content:encoded>
      <guid>https://itwasntme223.writeas.com/maria-db-and-the-mysterious-column-storage-engine-nnd0</guid>
      <pubDate>Mon, 02 Jun 2025 16:24:28 +0000</pubDate>
    </item>
  </channel>
</rss>