How To Install MariaDB on CentOS Stream 9
MariaDB is an open source relational database management system (DBMS) that is a compatible drop-in replacement for the widely used MySQL database technology. MariaDB is based on SQL and supports ACID-style data processing with guaranteed atomicity, consistency, isolation and durability for transactions.
Installing MariaDB Server
yum install mariadb-server
Check the version of MariaDB server by following command.
mysql -V
Once the installation is complete, enable MariaDB using the commands below.
systemctl enable mariadb
systemctl start mariadb
systemctl status mariadb
Secure your MariaDB server
You must secure the MariaDB server by running the following command.
mysql_secure_installation
Access MariaDB server
To login to the MariaDB server, enter the following command with the password that was set previously,
mysql -u root -p
Creating a new database and new user with password
Let's create a new database with custom user and password.
First, log in as root user, then type the following commands:
mysql -u root -p
CREATE DATABASE crowncloud;
CREATE user username;
GRANT ALL ON crowncloud.* TO username@localhost IDENTIFIED BY 'password';
exit
This concludes our topic of installing MariaDB on CentOS Stream 9 system.