Configuring write caching on Linux

How linux write cache works

Let’s start by explaining what write-back caching is and how it works to better understand the Linux write cache. Write caching is a feature available on most hard drives that allows them to collect all data into the drive’s cache memory, before being permanently written to disk. Once a certain amount of data is collected in the hard drive’s cache memory, the whole data chunk is transferred and stored with a single writing event.

Read more

SQLite Linux Tutorial

SQLite Linux Tutorial for Beginners

This SQLite Linux tutorial is intended for beginners who wish to learn how to get started with SQLite database. SQLite is one of the world’s most widely-used Database programs. So, what is a Database, and what is SQLite?

Read more

Migrate WordPress multisite to new server

WordPress is a free and open source Content Management System written in PHP and is what a vast segment of websites is based on. The platforms has a vary nice feature: it allows the creation and management of multiple websites from the same installation. While migrating a WordPress installation is quite easy, to migrate WordPress multisite to a new server requires additional steps. In this tutorial we see how to proceed.

Read more

Saving the output of a PostgreSQL query to text file

Saving an output of PostgreSQL query to a text file

When using PostgreSQL on Linux, there may be times that you wish to save the output of a query. Normally, the output appears on your screen. It’s possible to redirect this output to a file instead, which would allow you to view it later. In this guide, we’ll show you how to save the output of a PostgreSQL query to a file.

In this tutorial you will learn:

  • How to save the output of a PostgreSQL query to a file

Read more

Backing up a MySQL database on Linux

Linux commands to back up and restore MySQL database

It’s always a good idea to take frequent backups of your MySQL or MariaDB databases. They can potentially contain thousands of lines of irreplaceable data. Many users may be confused on how to back up their databases at first, as the process differs quite a bit from backing up ordinary files. The process of restoring a backup must also be known, as there’s no point in having a backup if the user cannot reliably restore it.

In this guide, we’ll go over various command line examples to back up and restore MySQL or MariaDB databases on a Linux system. You can then use these commands to make regular backups of your databases, or even add them to a Bash script that can do most of the work for you. Another option is to configure cron to make regularly scheduled backups of your databases.

In this tutorial you will learn:

  • How to back up MySQL or MariaDB database (one or multiple)
  • How to restore a MySQL or MariaDB database backup

Read more

Changing MariaDB user password

How to change MariaDB user password

Have you or one of your MariaDB users forgotten the password to a MariaDB account? It’s very easy to reset a MariaDB user password on Linux, and we’ll show you the commands and step by step instructions below.

Resetting the MariaDB root password requires a different set of instructions, which we also cover below. Depending on which account you need to change the password for (a normal user or root), follow the appropriate section below.

In this tutorial you will learn:

  • How to change MariaDB user password
  • How to change MariaDB root password
Changing MariaDB user password

Changing MariaDB user password

Read more

main

Introduction to database normalization: the first three normal forms

The goal of a relational database normalization is to achieve and improve data integrity and avoid data redundancy so to avoid possible insertion, updation or deletion anomalies. A relational database is normalized by applying a series of rules called normal forms. In this article we will discuss the first three normal forms.

In this tutorial you will learn:

  • What is the first normal form
  • What is the second normal form
  • What is the third normal form
main

Read more

How to read and create csv files using Python

How to read and create csv files using Python

CSV is the acronym of “Comma Separated Values”. A csv file is a just plain text document used to represent and exchange tabular data. Each row in a csv file represents an “entity”, and each column represents an attribute of it. Columns are usually separated by a comma but other characters can be used as field separator instead of it. In this tutorial we will see how to read and create csv files using Python and specifically the csv module, which is part of the
language standard library.

In this tutorial you will learn:

  • How to read csv rows as a list of strings
  • How to read a csv as a list of dictionaries
  • How to create a csv using Python
  • How to create a csv starting from a list of dictionaries

Read more

How to install RegRipper registry data extraction tool on Linux

RegRipper is an open source forensic software used as a Windows Registry data extraction command line or GUI tool. It is written in Perl and this article will describe RegRipper command line tool installation on the Linux systems such as Debian, Ubuntu, Fedora, Centos or Redhat. For the most part, the installation process of command line tool RegRipper is OS agnostic except the part where we deal with installation pre-requisites.

Pre-requisites

First we need to install all prerequisites. Choose a relevant command below based on the Linux distribution you are running:

DEBIAN/UBUNTU
# apt-get install cpanminus make unzip wget
FEDORA
# dnf install perl-App-cpanminus.noarch make unzip wget perl-Archive-Extract-gz-gzip.noarch which
CENTOS/REDHAT
# yum install  perl-App-cpanminus.noarch make unzip wget perl-Archive-Extract-gz-gzip.noarch which

Read more

How to promote Mediawiki user with sysop and bureaucrat privileges

The following lines will describe a procedure on how to promote mediawiki user to sysop and bureaucrat role directly using MySQL database.

Access database

First, connect to your database using mysql client. Depending on your environment you can run something like:

$ mysql -u USER -p PASSWORD

Once you get to the MySQL command prompt select appropriate Mediawiki database. In the example below the database name is wiki:

mysql> use wiki                                                                                                      
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed

Read more