MariaDB Server is a cross-platform relational database that allows to access data using SQL language. MariaDB Server is a fork of MySQL Server. This means that development of MariaDB was started from the original repository of MySQL. MariaDB is an open-source project which might be drop-in replacement for MySQL. MariaDB Server is available under the GPLv2 license.
This tutorial shows how to install MariaDB on Raspberry Pi.
Connect to Raspberry Pi via SSH, update the package lists and install MariaDB:
sudo apt updatesudo apt install -y mariadb-serverAfter the installation is completed, we can check MariaDB version:
mariadb --versionWe can execute the following command to check whether MariaDB service is running:
sudo service mariadb statusIf you want to stop, start and restart the MariaDB service then use these commands:
sudo service mariadb stopsudo service mariadb startsudo service mariadb restartBy default, password for the root user is blank. These means that we can connect to MariaDB Server without any authentication:
sudo mariadb -u rootOne connected, execute the following SQL statement to change password for the root user:
ALTER USER root@localhost IDENTIFIED BY 'pwd123';Run exit command inside the client to exit interactive mode:
exitNow try to connect again to MariaDB Server using password:
mariadb -u root -pRun the following command if you decided completely remove any package with a name that starts with mariadb and anything related to it:
sudo apt purge -y mariadb* 
             
                         
                         
                        
Leave a Comment
Cancel reply