Install and Setup

    Tested OS πŸ”—

    This setup was done and tested on Ubuntu 22.04

    Source: https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-22-04

    Install MariaDB πŸ”—

    sudo apt install mariadb-server
    

    Start πŸ”—

    sudo systemctl start mysql.service
    

    Configure πŸ”—

    As of July 2022 mysql_secure_installation will produce an error due how it attempts connection. This error results in a loop.

    Open SQL command prompt πŸ”—

    See instructions here.

    Set root password πŸ”—

    Replace p@s$w0rD by a suitable strong password.

    ALTER USER 'root'@'localhost' IDENTIFIED BY 'p@s$w0rD';
    

    Close SQL command prompt πŸ”—

    exit
    

    You will no longer be able to access mysql using sudo mysql

    Run command to secure installation πŸ”—

    Now secure the setup. Run the command and follow the steps as appropriate.

    sudo mysql_secure_installation