How To Install MariaDB On CentOS 8
How To Install MariaDB On CentOS 8
You can obtain MariaDB packages for CentOS 8 / RHEL 8 in two ways.
RHEL 8
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.4/rhel8-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
EOF
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
haven't set the root password yet, you should just press enter here.
Enter current password for root (enter for none): << Just Press Enter
Setting the root password or using the unix_socket ensures that nobody
can log into the MariaDB root user without the proper authorisation.
You already have your root account protected, so you can safely answer 'n'.
... skipping.
You already have your root account protected, so you can safely answer 'n'.
Change the root password? [Y/n] Y << Set MariaDB root password
... Success!
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
... Success!
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] Y << Disallow root login remotely
... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
Remove test database and access to it? [Y/n] Y << Remove test database
... Success!
... Success!
Reloading the privilege tables will ensure that all changes made so far
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
Also try to create a new database, user and assign privileges to a database.
You may also required install phpMyAdmin to manage MariaDB using web
interface, which provides easy way to work.
Access MariaDB
Login into MariaDB server with the below command.
mysql -u root –p
Password required