Jump to Navigation

Recently created

MySQL: Restores, binlogs and GTIDs

Part of a backup strategy is deciding how to handle the binlogs. When using GTIDs this is even more important. This page assumes you have enabled the binlogs in the server you backup.

Binlog handling by MySQL

When MySQL starts, it looks for existing binlogs.

Whether it finds existing binlogs or not, it will start a new binlog file. It will get number 000001 if no binlogs were found, or the next highest number if there are already binlogs.

MySQL: Roll forward (PITR)

After restoring a backup it is possible to roll forward your databases by applying the binlogs. This means that all committed transactions between two points in time are executed again. A roll forward  can happen on the original server the binlogs were generated or on some other server.

A roll forward is executed by translating the binlogs to plain SQL statements and executing them. This means that if you try to apply binlogs to a database some statements may fail, if the start situation was not entirely correct.

MySQL: Backups using xtrabackup

This is a guide about creating MySQL backups by using Percona xtrabackup.

Using xtrabackup backup has the following characteristics:

MySQL: Backups with file system snapshots

This is a guide about creating MySQL backups by using file system snapshots.

Using snapshot backup has the following characteristics:

MySQL: Backups by copying files

This is a guide about creating MySQL backups by copying files.

Using a file copy backup has the following characteristics:

  • Offline backup;
  • Full backup;
  • All databases and tables are always backed up and restored;
  • For both MyISAM and InnoDB tables;
  • Can be run remotely by using a ssh connection.

Creating a backup

Before creating the full backup, shutdown the database as cleanly as possible.

MySQL: files

This is a list of files you are likely to find in you MySQL data directory (often /var/lib/mysql).

Database files

Within the data directory there will be one subdirectory for each defined database, containing the following files:

MySQL: Backups with mysqldump

This is a guide about creating MySQL backups using mysqldump.

Using mysqldump has the following characteristics:

  • Online backup;
  • Full backup;
  • Selection of databases and tables;
  • For both MyISAM and InnoDB tables;
  • Can be run remotely;
  • Read lock during the dump, unless only InnoDB tables are dumped.

Creating a backup

To create a consistent, full backup, on a database with MyISAM and/or InnoDB tables, use:

Lenovo E145: Backlight

Symptoms

The backlight brightness of an Lenovo E145 laptop with a Radeon HD 8240 graphics controller can not be adjusted on Debian. Neither the Fn-F7/Fn-F8 keys are working nor any other interface.

Solution

Force the use of the kernel Radeon driver by installing the (non-free) Radeon firmware.

Background

There are several drivers that may be used by the Linux kernel and the X Windows System. The trick is forcing the correct one, as not all drivers support the backlight.

Trouble in libreoffice Calc

I recently started to experience strange behavior in Calc. When I copied cells and pasted them, it sometimes did not work correctly. Worse, when I tried to do a second paste, formulas consistently got lost and I got only the cell values.

It turns out xfce4-clipman is the culprit. This is a plugin that keeps a history of your selections. According to the manual, it is a good idea to check the option Sync selections. Turning it off, though, seems to solve this problem.

MySQL: Stored programs quick reference

This is a quick reference guide for writing MySQL stored programs. It is assumed you have some experience with similar programming languages (for example, Oracle PL/SQL). This has been written for MySQL 5.6.

Defining stored programs

There are four kinds of stored programs:

  • Procedures
  • Functions
  • Triggers
  • Events

Functions can be called from SQL queries.

Pages

Subscribe to Recently created


by Dr. Radut