Below you will find pages that utilize the taxonomy term “Database”
DevOps Lab: Run Your Own Database Server
Your web applications need a solution to store and retrieve its data. A relational database is often used in web applications. MySQL, MariaDB and PostgreSQL are some popular relational databases. There’s also SQLite. Many applications can use any of these relational databases by the virtue of the database layer abstraction. If you are writing your own web application, pick any one database and install it on your web server.
Install The Database
- Install the package.
- Enable and start the database
systemd
unit. - Initialize the database server.
- Create databases.
- Create database users and set their passwords.
Connect The Web Application To The Database Server
PostgreSQL Cheatsheet
Install PostgreSQL Server
Fedora and CentOS:
sudo dnf install postgresql-server
Ubuntu 18.04:
sudo apt install postgresql
New Server Initialization
On CentOS 7/Fedora 30:
sudo postgresql-setup initdb
Upgrading From An Older Version
sudo postgresql-setup --upgrade
Administering The Database Server
Managing The postgresql
Daemon
Starting PostgreSQL server
sudo systemctl start postgresql
Checking PostgreSQL Server Status:
sudo systemctl status postgresql
Enabling PostgreSQL Server Systemd Unit/Enabling PostgreSQL Server On Boot:
sudo systemctl enable postgresql
Allowing Password Based Login From localhost
Edit /var/lib/pgsql/data/pg_hba.conf
as privileged user(root) and add this line:
Understanding and Implementing MySQL Replication: A Guide for All Skill Levels
In this tutorial, I will provide step-by-step process to implement MySQL replication. We will create one master and one slave. We will use two CentOS 6 servers - one for master and the other for slave. This following steps have been tested on two virtual machines.
Our master server will have IP address 192.168.122.10. Our slave server will have IP address 192.168.122.12.
You might want to run SELinux in permissive mode.