Installing MariaDB
Procedure
- Use PuTTY to log in to the server as the root user.
- Run the following command to install MariaDB:
yum install mariadb* -y
- Run the following commands to modify the Makefile file:
- Open my.cnf.
vim /etc/my.cnf
- Press i to enter the insert mode and modify the file as follows:
Before the modification:
[mysqld]
After the modification:
[mysqld] skip-grant-tables
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open my.cnf.
- Run the following command to start the database:
systemctl start mariadb.service
- Run the following command to access the database:
mysql -u root
- Run the following command to access MySQL:
use mysql;
- Run the following commands to modify the plugin attribute:
update user set authentication_string=PASSWORD(''), plugin='mysql_native_password' where user='root'; flush privileges; - Run the following commands to create a user with the read-only permission and a user with all permissions:
MariaDB [(none)]> grant select on *.* to 'test'@'%' identified by '123456'; MariaDB [(none)]> grant all on *.* to 'pasa'@'%' identified by '123456'; MariaDB [(none)]> flush privileges;
- After the creation is complete, enter exit.
- Run the following commands to check whether the users are successfully created:
mysql -upasa -p123456
The users are successfully installed if the following information is displayed:

Parent topic: Configuring the Compilation Environment