nerdexam
Red_Hat

EX300(23Q) · Question #19

Mariadb The database name should be contacts. It should be access only within the localhost. Set a password for root user as "Postroll". Other than the root user, the user andrew able to read the…

yum groupinstall -y mariadb mariadb-client systemctl start mariadb systemctl enable mariadb (We don't need to open firewall port because it says that only access from localhost) mysql_secure_installation wget http://classroom.example.com/pub/rhce/backup.mdb mysql -u root -p…

Configure MariaDB Database

Question

Mariadb
  • The database name should be contacts. It should be access only within the localhost.
  • Set a password for root user as "Postroll". Other than the root user, the user andrew able to read the query from the above mentioned database. The user should be authenticated with the password as "Postroll".

Explanation

yum groupinstall -y mariadb mariadb-client systemctl start mariadb systemctl enable mariadb

(We don't need to open firewall port because it says that only access from localhost)

mysql_secure_installation

wget http://classroom.example.com/pub/rhce/backup.mdb

mysql -u root -p CREATE DATABASE Contacts; CREATE USER andrew@localhost IDENTIFIED BY 'Postroll'; GRANT SELECT ON Contacts.* TO andrew@localhost;

mysql -u root -p Contacts < backup.mdb

Topics

#MariaDB#database user privileges#localhost restriction#SQL GRANT

Community Discussion

No community discussion yet for this question.

Full EX300(23Q) Practice