I am a brand new MariaDB and RHEL Eight consumer. How do I set up MariaDB on RHEL Eight server utilizing the yum command?
Introduction – MariaDB is a free and open supply database administration system. It acts as a drop alternative for Oracle MySQL server. It’s a neighborhood drive and developed department of Oracle MySQL. MariaDB is a multi-user, multi-threaded SQL database server. This web page explains find out how to set up the newest secure model of MariaDB on RHEL Eight server.
How one can set up MariaDB on RHEL Eight
The process to put in MariaDB on a Purple Hat Enterprise Linux Eight is as follows:
Open the terminal utility. Another choice is to log in utilizing the ssh command
ssh consumer@rhel-Eight-server-ipPutting in the MariaDB on RHEL Eight, sort:
sudo yum set up mariadb-serverSecuring the MariaDB server in RHEL Eight, run:
sudo mysql_secure_installationLastly check your set up by working:
mysql -u root -p
Allow us to see all steps in particulars.
Putting in MariaDB on RHEL Eight utilizing the yum command
Kind the next yum command:
$ sudo yum set up mariadb-server
How one can allow mariadb.service at RHEL Eight boot time
Run the next systemctl command:
$ sudo systemctl allow mariadb.service
Created symlink /and so forth/systemd/system/mysql.service ? /usr/lib/systemd/system/mariadb.service.
Created symlink /and so forth/systemd/system/mysqld.service ? /usr/lib/systemd/system/mariadb.service.
Created symlink /and so forth/systemd/system/multi-user.goal.needs/mariadb.service ? /usr/lib/systemd/system/mariadb.service.
How one can begin/cease/restart mariadb.service on RHEL Eight
Once more use the next syntax:
$ sudo systemctl cease mariadb.service
$ sudo systemctl begin mariadb.service
$ sudo systemctl restart mariadb.service
$ sudo systemctl standing mariadb.service
Click on to enlarge
How one can safe the MariaDB Server on RHEL Eight
You will need to safe the MariaDB server by working the next command for manufacturing use:
$ sudo mysql_secure_installation
Securing the MariaDB Server
How do I log in to the MariaDB server?
Use the mysql command as follows:
$ mysql -u root -p
Testing the MariaDB server set up
Above instructions signifies the set up has been profitable on RHEL Eight server. Now you can add customers and create databases in your functions written in PHP, Perl, Python and extra.
How one can add database on the MariaDB server
First, log in as root consumer:
$ mysql -u root -p mysql
Create a brand new MariaDB database known as nixcraft. Kind the next command at MariaDB> immediate:
CREATE DATABASE nixcraft;
How one can add customers on the MariaDB server
Create a brand new consumer known as vivek for database known as nixcraft:
GRANT ALL ON nixcraft.* TO vivek@localhost IDENTIFIED BY ‘secretePasswordHere’;
How to connect with the MariaDB database nixcraft utilizing vivek account
$ mysql -u vivek -p’secretePasswordHere’ nixcraft
$ mysql -u vivek -p nixcraft
For additional info see:
You accomplished and secured MariaDB on RHEL Eight server. Additional, you discovered find out how to create customers and databases on the MariaDB server. For more information see MariaDB web site right here.