{"id":190,"date":"2020-05-27T19:45:37","date_gmt":"2020-05-27T18:45:37","guid":{"rendered":"https:\/\/alexskra.com\/blog\/?p=190"},"modified":"2022-08-04T00:24:39","modified_gmt":"2022-08-03T23:24:39","slug":"how-to-manage-databases-mariadb","status":"publish","type":"post","link":"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/","title":{"rendered":"How to manage databases (MariaDB)"},"content":{"rendered":"\n<p>Databases are perfect for storing data efficiently. There are many different databases, but in this post, I&#8217;ll talk specifically about MariaDB. Follow along and learn how to install MariaDB, create databases, and give users access to using them. I&#8217;ll also show you how to backup and restore your database.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">Installation of MariaDB<\/h2>\n\n\n\n<p>I&#8217;ll be using Ubuntu 20.04, so you might have to install it another way if you&#8217;re using something else.<\/p>\n\n\n\n<p>Let&#8217;s get on with it!<\/p>\n\n\n\n<p>Open a terminal and run:<br><code>sudo apt install mariadb-server<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"786\" height=\"527\" src=\"https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/Skjermdump-fra-2020-05-27-19-31-53.png\" alt=\"Installation of MariaDB. Press Y and enter to continue.\" class=\"wp-image-196\" srcset=\"https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/Skjermdump-fra-2020-05-27-19-31-53.png 786w, https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/Skjermdump-fra-2020-05-27-19-31-53-300x201.png 300w, https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/Skjermdump-fra-2020-05-27-19-31-53-768x515.png 768w\" sizes=\"auto, (max-width: 786px) 100vw, 786px\" \/><figcaption>Press Y and enter to continue installing MariaDB.<\/figcaption><\/figure>\n\n\n\n<p>Congratulations, MariaDB is now installed! That was quick!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Create a MariaDB database<\/h2>\n\n\n\n<p>You can have multiple databases on one MariaDB installation. You might want to have one for your blog, and another one for the rest of your website. Let&#8217;s create a database called blog, but feel free to call it whatever you want.<\/p>\n\n\n\n<p>In the terminal, run:<br><code>sudo mysql<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"786\" height=\"527\" src=\"https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/Skjermdump-fra-2020-05-27-19-34-20.png\" alt=\"Terminal with MariaDB prompt.\" class=\"wp-image-197\" srcset=\"https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/Skjermdump-fra-2020-05-27-19-34-20.png 786w, https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/Skjermdump-fra-2020-05-27-19-34-20-300x201.png 300w, https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/Skjermdump-fra-2020-05-27-19-34-20-768x515.png 768w\" sizes=\"auto, (max-width: 786px) 100vw, 786px\" \/><figcaption>Now you can enter commands for MariaDB.<\/figcaption><\/figure>\n\n\n\n<p>You&#8217;re now talking to MariaDB and can issue commands.<\/p>\n\n\n\n<p>To create a database called <strong>blog<\/strong>, you just run the following:<br><code>CREATE DATABASE blog;<\/code><\/p>\n\n\n\n<p>Make sure the database was created by listing all existing databases:<br><code>SHOW DATABASES;<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Create a MariaDB user<\/h2>\n\n\n\n<p>You can have multiple users on one installation. Multiple users can be handy if you want a user with access to one specific database. You can also fine-tune permissions, like giving users read-only permissions on particular databases.<\/p>\n\n\n\n<p>To create a user called <strong>alexskra<\/strong>, with the password <strong>secret<\/strong>, run:<br><code>CREATE USER 'alexskra'@localhost IDENTIFIED BY 'secret';<\/code><\/p>\n\n\n\n<p>Make sure the user was created by running:<br><code>SELECT user FROM mysql.user;<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Set permissions for MariaDB user<\/h2>\n\n\n\n<p>To give the user called <strong>alexskra<\/strong> access to the database called <strong>blog<\/strong>, run the following:<br><code>GRANT ALL PRIVILEGES ON blog.* TO 'alexskra'@localhost;<\/code><\/p>\n\n\n\n<p>For the changes to take effect, you need to run:<br><code>FLUSH PRIVILEGES;<\/code><\/p>\n\n\n\n<p>Done, you can now exit the MariaDB command prompt by typing exit!<\/p>\n\n\n\n<p>To make sure everything is working, let&#8217;s connect to the blog database as our new user:<br><code>mysql -p -u alexskra blog<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"786\" height=\"527\" src=\"https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/Skjermdump-fra-2020-05-27-19-41-28.png\" alt=\"Logging in to MariaDB was a success.\" class=\"wp-image-198\" srcset=\"https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/Skjermdump-fra-2020-05-27-19-41-28.png 786w, https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/Skjermdump-fra-2020-05-27-19-41-28-300x201.png 300w, https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/Skjermdump-fra-2020-05-27-19-41-28-768x515.png 768w\" sizes=\"auto, (max-width: 786px) 100vw, 786px\" \/><figcaption>A successful connection to our database. It&#8217;s working!<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Backing up your database<\/h2>\n\n\n\n<p>Backups are important. If your server goes down, you want to be able to restore the data. Server failures or mistakes don&#8217;t happen often, but backups are there for you in case something goes wrong.<\/p>\n\n\n\n<p>There are two different ways of backing up databases I tend to use. The first one is with the regular mysqldump tool, and the other is with mydumper.<\/p>\n\n\n\n<p>Regular mysqldump is usually good enough, but it can be quite slow if you have a lot of data. Mydumper, on the other hand, can back up databases in parallel using multiple threads.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"894\" src=\"https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/bonfire-burning-camp-campfire-1368382-scaled-e1590604330466-1024x894.jpg\" alt=\"Picture of a fire, to represent what can happen without backups.\" class=\"wp-image-202\" srcset=\"https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/bonfire-burning-camp-campfire-1368382-scaled-e1590604330466-1024x894.jpg 1024w, https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/bonfire-burning-camp-campfire-1368382-scaled-e1590604330466-300x262.jpg 300w, https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/bonfire-burning-camp-campfire-1368382-scaled-e1590604330466-768x671.jpg 768w, https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/bonfire-burning-camp-campfire-1368382-scaled-e1590604330466-1536x1342.jpg 1536w, https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/bonfire-burning-camp-campfire-1368382-scaled-e1590604330466-1200x1048.jpg 1200w, https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/bonfire-burning-camp-campfire-1368382-scaled-e1590604330466.jpg 1707w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Without backups, your data might go up in smoke, and nobody wants that.<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Backup using mysqldump<\/h3>\n\n\n\n<p>These examples are using <strong>alexskra <\/strong>as the username.<\/p>\n\n\n\n<p>If you want to back up all databases, run:<br><code>mysqldump -p -u alexskra -A &gt; all.sql<\/code><\/p>\n\n\n\n<p>If you want to back up a single database called blog, run:<br><code>mysqldump -p -u alexskra blog &gt; blog.sql&nbsp;<\/code><\/p>\n\n\n\n<p>And if you want to back up a table called persons from a database called blog, run:<br><code>mysqldump -p -u alexskra blog persons &gt; persons.sql&nbsp;<\/code><\/p>\n\n\n\n<p>You might want to compress the SQL file to reduce the file size so that it can be moved faster to other servers. You can do it in one go like this:<br><code>mysqldump -p -u alexskra blog &gt; blog.sql &amp;&amp; tar -czvf blog.sql.tar.gz blog.sql<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"backup-using-mydumper\">Backup using mydumper<\/h3>\n\n\n\n<p>Unlike mysqldump, mydumper doesn&#8217;t come with MariaDB, so you need to install it if this is what you want to use. <strong>Note that mydumper doesn&#8217;t seem to be working well with the included MariaDB version in Ubuntu 20.04, so use with caution<\/strong>:<br><code>sudo apt install mydumper<\/code><\/p>\n\n\n\n<p>Here is an example of how to use it to back up a database called blog and store it in a folder called kittens, using the user <strong>alexskra<\/strong>:<br><code>mydumper -p -u alexskra -B blog -o kittens<\/code><\/p>\n\n\n\n<p>You can then compress the folder using this:<br><code>tar -czvf kittens.tar.gz kittens<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Restoring your database from a backup<\/h2>\n\n\n\n<p>I&#8217;ll show you two different ways to restore your database. Which one you use depends on what you used to create the backup. If you created the backup with mysqldump, then you should use that. If you used mydumper, then you should use myloader.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Restore backup created with mysqldump<\/h3>\n\n\n\n<p>To restore a backup, you first need to decompress and unpack the file if it&#8217;s compressed:<br><code>tar -xzvf blog.sql.tar.gz<\/code><\/p>\n\n\n\n<p>Then, you can import it like this:<br><code>mysql -p -u alexskra blog &lt; blog.sql<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Restore backup created with myloader<\/h3>\n\n\n\n<p>If you already have the myloader command, then you can follow along, if not, then you need to install the mydumper package as described <a href=\"#backup-using-mydumper\">here<\/a>.<\/p>\n\n\n\n<p>First, decompress the file:<br><code>sudo tar -xzvf kittens.tar.gz<\/code><\/p>\n\n\n\n<p>Then import it from the <strong>kittens<\/strong>&#8216;<strong> <\/strong>folder using the <strong>alexskra <\/strong>user:<br><code>myloader -p -u alexskra -d kittens<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Update table statistics<\/h3>\n\n\n\n<p>Many probably forget or don&#8217;t know that they most likely should update table statistics after importing tables. Failing to do so might leave your database thinking the cardinality is very low for your columns, which, in turn, can cause it not to use related indexes.<\/p>\n\n\n\n<p>I&#8217;ve failed at this myself, and MariaDB scanned the whole table, resulting in long query times.<\/p>\n\n\n\n<p>It&#8217;s easy to fix, and you can use the option that suits you best:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Either run <code>ANALYZE TABLE &lt;table>;<\/code> for each table<\/li><li>or just restart the database.<\/li><\/ul>\n\n\n\n<p>Have fun with MariaDB! \ud83d\ude0a<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Databases are perfect for storing data efficiently. There are many different databases, but in this post, I&#8217;ll talk specifically about MariaDB. Follow along and learn how to install MariaDB, create databases, and give users access to using them. I&#8217;ll also show you how to backup and restore your database.<\/p>\n","protected":false},"author":1,"featured_media":200,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[22,6],"class_list":["post-190","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-mariadb","tag-ubuntu"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to manage databases (MariaDB) - ALEXSKRA<\/title>\n<meta name=\"description\" content=\"How to install MariaDB, set up databases, create users, and set permissions. It also includes some examples on how to backup your database with mysqldump.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to manage databases (MariaDB) - ALEXSKRA\" \/>\n<meta property=\"og:description\" content=\"How to install MariaDB, set up databases, create users, and set permissions. It also includes some examples on how to backup your database with mysqldump.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/\" \/>\n<meta property=\"og:site_name\" content=\"ALEXSKRA\" \/>\n<meta property=\"article:published_time\" content=\"2020-05-27T18:45:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-08-03T23:24:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/mariadb.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"888\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Alex\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alex\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/\"},\"author\":{\"name\":\"Alex\",\"@id\":\"https:\/\/alexskra.com\/blog\/#\/schema\/person\/461ae6ff3c2afab92c7629553db749b8\"},\"headline\":\"How to manage databases (MariaDB)\",\"datePublished\":\"2020-05-27T18:45:37+00:00\",\"dateModified\":\"2022-08-03T23:24:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/\"},\"wordCount\":822,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/alexskra.com\/blog\/#\/schema\/person\/461ae6ff3c2afab92c7629553db749b8\"},\"image\":{\"@id\":\"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/mariadb.png\",\"keywords\":[\"mariadb\",\"ubuntu\"],\"articleSection\":[\"Linux\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/\",\"url\":\"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/\",\"name\":\"How to manage databases (MariaDB) - ALEXSKRA\",\"isPartOf\":{\"@id\":\"https:\/\/alexskra.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/mariadb.png\",\"datePublished\":\"2020-05-27T18:45:37+00:00\",\"dateModified\":\"2022-08-03T23:24:39+00:00\",\"description\":\"How to install MariaDB, set up databases, create users, and set permissions. It also includes some examples on how to backup your database with mysqldump.\",\"breadcrumb\":{\"@id\":\"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/#primaryimage\",\"url\":\"https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/mariadb.png\",\"contentUrl\":\"https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/mariadb.png\",\"width\":1200,\"height\":888,\"caption\":\"How to manage databases(MariaDB).\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/alexskra.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to manage databases (MariaDB)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/alexskra.com\/blog\/#website\",\"url\":\"https:\/\/alexskra.com\/blog\/\",\"name\":\"Alexskra\",\"description\":\"Web development, tech and thinkering\",\"publisher\":{\"@id\":\"https:\/\/alexskra.com\/blog\/#\/schema\/person\/461ae6ff3c2afab92c7629553db749b8\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/alexskra.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/alexskra.com\/blog\/#\/schema\/person\/461ae6ff3c2afab92c7629553db749b8\",\"name\":\"Alex\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/alexskra.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f899714899a7def0ae7532e94314afc60539b04dc007630f2d6de6fa08382347?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f899714899a7def0ae7532e94314afc60539b04dc007630f2d6de6fa08382347?s=96&d=mm&r=g\",\"caption\":\"Alex\"},\"logo\":{\"@id\":\"https:\/\/alexskra.com\/blog\/#\/schema\/person\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to manage databases (MariaDB) - ALEXSKRA","description":"How to install MariaDB, set up databases, create users, and set permissions. It also includes some examples on how to backup your database with mysqldump.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/","og_locale":"en_US","og_type":"article","og_title":"How to manage databases (MariaDB) - ALEXSKRA","og_description":"How to install MariaDB, set up databases, create users, and set permissions. It also includes some examples on how to backup your database with mysqldump.","og_url":"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/","og_site_name":"ALEXSKRA","article_published_time":"2020-05-27T18:45:37+00:00","article_modified_time":"2022-08-03T23:24:39+00:00","og_image":[{"width":1200,"height":888,"url":"https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/mariadb.png","type":"image\/png"}],"author":"Alex","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Alex","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/#article","isPartOf":{"@id":"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/"},"author":{"name":"Alex","@id":"https:\/\/alexskra.com\/blog\/#\/schema\/person\/461ae6ff3c2afab92c7629553db749b8"},"headline":"How to manage databases (MariaDB)","datePublished":"2020-05-27T18:45:37+00:00","dateModified":"2022-08-03T23:24:39+00:00","mainEntityOfPage":{"@id":"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/"},"wordCount":822,"commentCount":0,"publisher":{"@id":"https:\/\/alexskra.com\/blog\/#\/schema\/person\/461ae6ff3c2afab92c7629553db749b8"},"image":{"@id":"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/#primaryimage"},"thumbnailUrl":"https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/mariadb.png","keywords":["mariadb","ubuntu"],"articleSection":["Linux"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/","url":"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/","name":"How to manage databases (MariaDB) - ALEXSKRA","isPartOf":{"@id":"https:\/\/alexskra.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/#primaryimage"},"image":{"@id":"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/#primaryimage"},"thumbnailUrl":"https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/mariadb.png","datePublished":"2020-05-27T18:45:37+00:00","dateModified":"2022-08-03T23:24:39+00:00","description":"How to install MariaDB, set up databases, create users, and set permissions. It also includes some examples on how to backup your database with mysqldump.","breadcrumb":{"@id":"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/#primaryimage","url":"https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/mariadb.png","contentUrl":"https:\/\/alexskra.com\/blog\/wp-content\/uploads\/2020\/05\/mariadb.png","width":1200,"height":888,"caption":"How to manage databases(MariaDB)."},{"@type":"BreadcrumbList","@id":"https:\/\/alexskra.com\/blog\/how-to-manage-databases-mariadb\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/alexskra.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to manage databases (MariaDB)"}]},{"@type":"WebSite","@id":"https:\/\/alexskra.com\/blog\/#website","url":"https:\/\/alexskra.com\/blog\/","name":"Alexskra","description":"Web development, tech and thinkering","publisher":{"@id":"https:\/\/alexskra.com\/blog\/#\/schema\/person\/461ae6ff3c2afab92c7629553db749b8"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/alexskra.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/alexskra.com\/blog\/#\/schema\/person\/461ae6ff3c2afab92c7629553db749b8","name":"Alex","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/alexskra.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f899714899a7def0ae7532e94314afc60539b04dc007630f2d6de6fa08382347?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f899714899a7def0ae7532e94314afc60539b04dc007630f2d6de6fa08382347?s=96&d=mm&r=g","caption":"Alex"},"logo":{"@id":"https:\/\/alexskra.com\/blog\/#\/schema\/person\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/alexskra.com\/blog\/wp-json\/wp\/v2\/posts\/190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alexskra.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alexskra.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alexskra.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alexskra.com\/blog\/wp-json\/wp\/v2\/comments?post=190"}],"version-history":[{"count":12,"href":"https:\/\/alexskra.com\/blog\/wp-json\/wp\/v2\/posts\/190\/revisions"}],"predecessor-version":[{"id":331,"href":"https:\/\/alexskra.com\/blog\/wp-json\/wp\/v2\/posts\/190\/revisions\/331"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/alexskra.com\/blog\/wp-json\/wp\/v2\/media\/200"}],"wp:attachment":[{"href":"https:\/\/alexskra.com\/blog\/wp-json\/wp\/v2\/media?parent=190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alexskra.com\/blog\/wp-json\/wp\/v2\/categories?post=190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alexskra.com\/blog\/wp-json\/wp\/v2\/tags?post=190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}