MariaDB Install

MariaDB is the open-source fork of Oracle owned MySQL.
  1. Install MariaDB:

    sudo dnf install mariadb-server mariadb -y
  2. Start MariaDB:

    sudo systemctl start mariadb
  3. Enable MariaDB to start when the system starts:

    sudo systemctl enable mariadb
  4. Check MariaDB status:

    sudo systemctl status mariadb
  5. Configure MariaDB:

    sudo mysql_secure_installation
    
    NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!
  6. Test MariaDB:

    mysql -u root -p
    
    Enter password:
    Welcome to the MariaDB monitor.  Commands end with ; or \g.
    Your MariaDB connection id is 13
    Server version: 10.3.28-MariaDB MariaDB Server
    
    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)]> exit
    Bye
  7. To access MariaDB outside of the local host, do the following:

    This is not required for NextCloud functionality and is an optional configuration

    1. Update firewall to allow inbound traffic on port 3306:

      sudo firewall-cmd --permanent --zone=public --add-port=3306/tcp
      sudo systemctl reload firewalld
    2. To allow the root account to log in from any host on the local network, excute the following:

      GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.1.%' IDENTIFIED BY '<root password>' WITH GRANT OPTION; (1)
      1 Supply the password for the system root account.