{"id":87,"date":"2019-07-21T10:47:00","date_gmt":"2019-07-21T10:47:00","guid":{"rendered":"https:\/\/hostup.org\/blog\/?p=87"},"modified":"2021-01-24T20:51:14","modified_gmt":"2021-01-24T20:51:14","slug":"how-to-install-mariadb-on-debian-10","status":"publish","type":"post","link":"https:\/\/hostup.se\/en\/blog\/how-to-install-mariadb-on-debian-10\/","title":{"rendered":"How To Install MariaDB on Debian 10"},"content":{"rendered":"\n<p>MariaDB is an open-source database management tool and is often installed as an alternative to MySQL since it has significant performance differences.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Install MariaDB<\/h2>\n\n\n\n<p>To install the server:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt-get install mariadb-server<\/pre>\n\n\n\n<p>Enable it on restart:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl enable mysql.service<\/pre>\n\n\n\n<p>Start MariaDB:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl start mysql.service<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Configure MariaDB<\/h2>\n\n\n\n<p>To configure MariaDB:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo mysql_secure_installation<\/pre>\n\n\n\n<p>You will now be prompted with a configuration setup file. Please read  through it and configure it to your liking. It is recommended to disable logins that are not from localhost.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Enter current password for root (enter for none): <strong>press Enter<\/strong><\/li><li>Set root password? [Y\/n]:&nbsp;<strong>Y<\/strong><\/li><li>New password:&nbsp;<strong>Enter password<\/strong><\/li><li>Re-enter new password: <strong>Repeat password<\/strong><\/li><li>Remove anonymous users? [Y\/n]: <strong>Y<\/strong><\/li><li>Disallow root login remotely? [Y\/n]: <strong>Y<\/strong><\/li><li>Remove test database and access to it? [Y\/n]: &nbsp;<strong>Y<\/strong><\/li><li>Reload privilege tables now? [Y\/n]: &nbsp;<strong>Y<\/strong><\/li><\/ul>\n\n\n<p><!--EndFragment--><\/p>\n\n\n<h2 class=\"wp-block-heading\">Step 3: Create your Database<\/h2>\n\n\n\n<p>After this you may create your database, but first we need to login into MySQL:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo mysql -u root -p<\/pre>\n\n\n\n<p>You can create your database by running the following commands. We will call it <strong>database1<\/strong> although you are free to call it whatever you want.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE DATABASE database1;<\/code><\/pre>\n\n\n\n<p>To create a new user:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE USER 'database1'@'localhost' IDENTIFIED BY 'password_here';<\/code><\/pre>\n\n\n\n<p>To assign the user to the joomla database and give it all permisions:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>GRANT ALL ON database1.* TO 'database1'@'localhost' IDENTIFIED BY 'password_here' WITH GRANT OPTION;<\/code><\/pre>\n\n\n\n<p>Remember to change <strong>password_here<\/strong> with your actual password.<\/p>\n\n\n\n<p>Exit and flush for the changes to take affect:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>FLUSH PRIVILEGES;\nEXIT;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>MariaDB is an open-source database management tool and is often installed as an alternative to MySQL since it has significant performance differences. Step 1: Install MariaDB To install the server: sudo apt-get install mariadb-server Enable it on restart: sudo systemctl enable mysql.service Start MariaDB: sudo systemctl start mysql.service Step 2: Configure MariaDB To configure MariaDB: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":146,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,10],"tags":[],"class_list":["post-87","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-tutorials"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/hostup.se\/en\/blog\/wp-json\/wp\/v2\/posts\/87","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hostup.se\/en\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hostup.se\/en\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hostup.se\/en\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hostup.se\/en\/blog\/wp-json\/wp\/v2\/comments?post=87"}],"version-history":[{"count":1,"href":"https:\/\/hostup.se\/en\/blog\/wp-json\/wp\/v2\/posts\/87\/revisions"}],"predecessor-version":[{"id":88,"href":"https:\/\/hostup.se\/en\/blog\/wp-json\/wp\/v2\/posts\/87\/revisions\/88"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hostup.se\/en\/blog\/wp-json\/wp\/v2\/media\/146"}],"wp:attachment":[{"href":"https:\/\/hostup.se\/en\/blog\/wp-json\/wp\/v2\/media?parent=87"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hostup.se\/en\/blog\/wp-json\/wp\/v2\/categories?post=87"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hostup.se\/en\/blog\/wp-json\/wp\/v2\/tags?post=87"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}