You are on page 1of 2

RHCE NW-Service Quickreference sheet

Service: maria DB

Packages and Installation


Name Description
mariadb client tools

mariadb-server server

SELinux Hints
types description
mysqld_db_t database files
Systemd Services and Startup Config
task cmd
main config file /etc/my.cnf
Security
Firewall Services/Ports
service ports
mysql TCP/3306

Host-based Security
config description

User-based Security
Config Tasks
Install and configure
task cmd
install yum install mariadb mairadb-server
set admin password sudo /usr/bin/mysql_secure_installation

Backup and restore DBs


task cmd
backup in sql mysqldump db_name > backup-file.sql
restore from sql mysql db_name < backup-file.sql

phisical backup mysqlhotcopy db_name [/path/to/new_directory]


restore from phy backup cp #backup #db
Create simple database schemas
task cmd
create dabase create database dbname
create table CREATE TABLE MyGuests (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY
KEY,
firstname VARCHAR(30) NOT NULL,
lastname VARCHAR(30) NOT NULL,
email VARCHAR(50),
reg_date TIMESTAMP
)

perform simple sql queries


task cmd
open sql terminal mysql -u user -h host -p dbname

You might also like