MARIADB SERVER ON RASPBERRY PI OS

MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. MariaDB turns data into structured information in a wide array of applications, ranging from banking to websites. Originally designed as enhanced, drop-in replacement for MySQL, MariaDB is used because it is fast, scalable and robust, with a rich ecosystem of storage engines, plugins and many other tools make it very versatile for a wide variety of use cases.
[email protected][~]# sudo apt-get -y install mariadb-server mariadb-client
Securing MariaDB Server
[email protected][~]# mysql_secure_installation
Enter password for user root: <– Enter the MySQL root password
Change the password for root? (Press y|Y for Yes, any other key for No): <– n
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : <– y
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : <– y Reload privilege tables now? (Press y|Y for Yes, any other key for No) : <– y
[email protected][~]# sudo systemctl restart mariadb
CREATING OF NEW USER AND DATABASE
Be sure to change stephen to your preferred username and password
to a strong password of your choosing as well as database name snet:
[email protected][~]# mysql -u root -p
[email protected][~]# CREATE USER 'stephen'@'localhost' IDENTIFIED BY 'password';
[email protected][~]# CREATE DATABASE snet;
[email protected][~]# GRANT ALL ON snet.* to 'stephen'@'localhost' IDENTIFIED BY 'password';
[email protected][~]# FLUSH PRIVILEGES;
[email protected][~]# exit
[email protected][~]# sudo systemctl restart mariadb