Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Databases»MariaDB»How to Install MariaDB on Ubuntu 22.04

    How to Install MariaDB on Ubuntu 22.04

    RahulBy RahulMay 25, 20222 Mins ReadUpdated:May 28, 2022

    MariaDB is a popular open-source relation database system developed by the original developer of the MySQL server. It is originally forked from the MySQL server with multiple enhancements.

    This tutorial will guide you with the installation of the MariaDB server on the Ubuntu 22.04 Linux system.

    1. Configure Repository

    The MariaDB packages are available in default Ubuntu repositories. Also, MariaDB provides an official repository to install the latest version on Ubuntu systems.

    In order to configure MariaDB Apt repository, open a terminal with a sudo privileged account and run the following commands.

    sudo apt install software-properties-common dirmngr apt-transport-https 
    sudo apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc' 
    sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] https://atl.mirrors.knownhost.com/mariadb/repo/10.8/ubuntu jammy main' 
    

    The above commands will create a repository file under /etc/apt/sources.list.d directory.

    2. Installing MariaDB on Ubuntu

    Next, execute the following commands to install the MariaDB server and client on your Ubuntu system.

    sudo apt update 
    sudo apt install mariadb-server 
    

    Press ‘y’ and hit Enter, when prompted for the confirmation.

    Installing MariaDB on Ubuntu
    Installing MariaDB Server on Ubuntu

    Once the installation is finished, execute the mysql_secure_installation script to secure MariaDB server and set a password for root account.

    sudo sudo mysql_secure_installation 
    

    Follow the on-screen instructions to complete the security wizard.

    3. Manage MariaDB Service

    MariaDB creates a systemd configuration file to manage its service. Use the following commands to stop, start, or restart the MariaDB service.

    sudo systemctl start mariadb 
    sudo systemctl stop mariadb 
    

    To view the current status of MariaDB service, type:

    sudo systemctl status mariadb 
    

    4. Connect to MariaDB

    You can get a MariaDB shell to create users, databases, and other related activities. To connect shell, type:

    mysql -u root -p 
    

    Type the MariaDB root user password you set with the mysql_secure_installation command.

    Output:
    Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 19 Server version: 10.8.3-MariaDB-2ubuntu1 Ubuntu 22.04 Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]>

    Conclusion

    This tutorial helped you to install and configure the MariaDB server on the Ubuntu system. Now you can create databases for your awesome applications. We strongly recommended creating a separate user account for the databases.

    database install mariadb mariadb MySQL Ubuntu 22.04
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Install .NET Core (dotnet) on Ubuntu 22.04
    Next Article How to Install Apache Solr 9.0 on Ubuntu 22.04

    Related Posts

    How to Create SFTP User in Ubuntu 22.04 (No Shell Access)

    Updated:June 14, 20224 Mins Read

    How To Install Anaconda on Ubuntu 22.04

    4 Mins Read

    How To Install XRDP on Ubuntu 22.04

    3 Mins Read

    Backup MySQL Databases to Amazon S3 (Shell Script)

    Updated:May 28, 20222 Mins Read

    How to Install Apache Maven on Ubuntu 22.04

    Updated:June 2, 20223 Mins Read

    How to Install Apache Solr 9.0 on Ubuntu 22.04

    Updated:May 26, 20223 Mins Read

    3 Comments

    1. Chris on October 16, 2014 5:40 am

      Fails. You seem to have broken your servers – there is no “raring” folder anymore.

      W: Failed to fetch 404 Not Found

      W: Failed to fetch 404 Not Found

      Reply
      • Rahul on October 17, 2014 2:51 am

        Hi Chris,

        Ubuntu raring has reached there end of life, that why mariadb has removed there support them this version. I have updated this article.

        Reply
    2. Swirl on March 15, 2014 6:29 pm

      thanks a lot – it helped – I succeeded
      used only windows til today…

      regards
      swirl

      Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • What is the /etc/nsswitch.conf file in Linux
    • How to Install Ionic Framework on Ubuntu 22.04
    • What is the /etc/hosts file in Linux
    • How to Install Angular CLI on Ubuntu 22.04
    • How to Install Composer on Ubuntu 22.04
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.