Automysqlbackup: Skipping the data of table mysql.event

When using automysqlbackup to dump your mysql databases, you might run into the following error:

While you can of course change the automysqlbackup script itself, to add the following line of code somewhere in the automysqlbackup script itself:

The option above is not upgrade proof, as your automysqlbackup script might get overwritten by the new version.

There is however an easier option to accomplisch this, and keep the settings:

Modify or Create your ~/.my.cnf and add the following lines of code to the mysqldump section:

Hope this helps!

Restore a single MySQL Table

If you ever had a problem with a MySQL Table being foobar because of a human error (or other bug), you might need to be able to restore only 1 single MySQL table.
Restoring an entire Database may cause other data loss, and this is of course something we don’t want.

So, if you have a mysql dump available, you can ‘filter’ our that specific table by using the sed command.

Let say the name of your table is tableToRestore and the file dbdump.sql is the file containing your database backup:

This will copy in the file dbdump.sql what is located between CREATE TABLE tableToRestore and the next CREATE TABLE corresponding to the next table.

You can then adjust the file dbdump_tableToRestore.sql which contains the structure of the table tableToRestore, and the data (a list of INSERT commands).

Configure a site with SSL on an Nginx server

This post describes how to setup a server block on nginx with a Thawte SSL123 certificate.

This how to can of course also be used with other SSL vendors (comodo, digicert, …) but you’ll have to change some steps of course 🙂

First, we’ll start with the certificate request.

To create your request, use the openssl command:

And follow the SSL csr generation process:

Now, if you look inside of your CSR files, you’ll see something like

Now it’s time to go and buy your certificate at your favorite SSL reseller…

Be sure to have a mailbox to be able to send your certificate approval email to (mainly this is: or webmaster@, hostmaster@, administrator@,…)

Once you have received your SSL Certificate from Thawte, create a new file and paste in the certificate.

So paste it inside of

Thawte has upgraded their root hierarchy to 2048bit RSA Keys (more information),  so you need the Intermediate CA to support old web browsers. For the nginx web server you can download the file from Thawte here by:

One you have this file, echo the contents and paste it at the end of your crt file.

Now enable SSL in your nginx server block by:

In my example, your site will listen to both Port 80 and 443 (SSL), you can of course redirect http to https by adding this in your nginx server block config: