<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[John's blog]]></title><description><![CDATA[John's blog]]></description><link>https://blog.kingzton.com</link><generator>RSS for Node</generator><lastBuildDate>Wed, 27 May 2026 08:14:57 GMT</lastBuildDate><atom:link href="https://blog.kingzton.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How to install MariaDB on Debian 12]]></title><description><![CDATA[Introduction
MariaDB is a popular open-source relational database management system that is widely used for its performance, stability, and compatibility with MySQL. Whether you are setting up a new server or migrating from another database system, i...]]></description><link>https://blog.kingzton.com/how-to-install-mariadb-on-debian-12</link><guid isPermaLink="true">https://blog.kingzton.com/how-to-install-mariadb-on-debian-12</guid><category><![CDATA[MariaDB]]></category><dc:creator><![CDATA[John Saldivar]]></dc:creator><pubDate>Wed, 10 Jul 2024 08:23:16 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/fPkvU7RDmCo/upload/8233c152b11a167876c7d4dc944c2a45.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-introduction"><strong>Introduction</strong></h2>
<p>MariaDB is a popular open-source relational database management system that is widely used for its performance, stability, and compatibility with MySQL. Whether you are setting up a new server or migrating from another database system, installing MariaDB on Debian 12 is a straightforward process. This guide will walk you through the necessary steps to get MariaDB up and running on your Debian 12 system. From updating your system and installing the MariaDB server to securing the installation and configuring it for your specific needs, this tutorial covers everything you need to ensure a smooth and secure setup. Let's get started!</p>
<ol>
<li><p><strong>Update the system:</strong></p>
<pre><code class="lang-apache"> <span class="hljs-attribute">sudo</span> apt update &amp;&amp; sudo apt upgrade -y
</code></pre>
</li>
<li><p><strong>Install MariaDB Server Installation:</strong> Run the security script to improve the security of your MariaDB installation.</p>
<pre><code class="lang-apache"> <span class="hljs-attribute">sudo</span> apt install mariadb-server -y
</code></pre>
</li>
<li><p><strong>Secure the MariaDB Installation:</strong> Run the security script to improve the security of your MariaDB installation.</p>
<pre><code class="lang-apache"> <span class="hljs-attribute">sudo</span> mysql_secure_installation
</code></pre>
<p> Follow the prompts to set the root password, remove anonymous users, disallow root login remotely, remove the test database, and reload privilege tables.</p>
</li>
<li><p><strong>Start and Enable MariaDB Service:</strong> Ensure that MariaDB is running and will start on boot.</p>
<pre><code class="lang-apache"> <span class="hljs-attribute">sudo</span> systemctl start mariadb
 <span class="hljs-attribute">sudo</span> systemctl enable mariadb
</code></pre>
</li>
<li><p><strong>Configure MariaDB (Optional): i</strong>f you need to configure MariaDB for remote access or adjust other settings, open the MariaDB configuration file:</p>
<pre><code class="lang-apache"> <span class="hljs-attribute">sudo</span> nano /etc/mysql/mariadb.conf.d/<span class="hljs-number">50</span>-server.cnf
</code></pre>
<p> For remote access, find the line <code>bind-address</code> and change it to:</p>
<pre><code class="lang-apache"> <span class="hljs-attribute">bind</span>-address = <span class="hljs-number">0.0.0.0</span>
</code></pre>
<p> Save and close the file.</p>
</li>
<li><p><strong>Create a MariaDB User:</strong> Create a new user and grant privileges:</p>
<pre><code class="lang-apache"> <span class="hljs-attribute">CREATE</span> USER 'myuser'@'%' IDENTIFIED BY 'mypassword';
 <span class="hljs-attribute">GRANT</span> <span class="hljs-literal">ALL</span> <span class="hljs-literal">ON</span> . TO 'myuser'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
 <span class="hljs-attribute">FLUSH</span> PRIVILEGES;
 <span class="hljs-attribute">EXIT</span>;
</code></pre>
</li>
<li><p><strong>Restart MariaDB Service:</strong> Restart the MariaDB service to apply any configuration changes.</p>
<pre><code class="lang-apache"> <span class="hljs-attribute">sudo</span> systemctl restart mariadb
</code></pre>
<h2 id="heading-conclusion"><strong>Conclusion</strong></h2>
<p> Installing MariaDB on Debian 12 is a straightforward process that involves updating your system, installing the MariaDB server, securing the installation, and configuring it to meet your needs. By following these steps, you ensure that your MariaDB server is not only up and running but also secure and optimized for your specific requirements. Whether you need to set up a new user, enable remote access, or adjust other settings, this guide provides a comprehensive approach to getting MariaDB ready for production use.</p>
</li>
</ol>
]]></content:encoded></item></channel></rss>