Taking MySQL dumps with a twist

Taking mysql dumps is pretty straightforward, but what if you needed to take a dump excluding certain tables? For this, you have two options: 1. use the –ignore-table option: mysqldump -u username -p database –ignore-table=database.table1 –ignore-table=database.table2 > database.sql This works fine as long as you don’t have too much tables to exclude. 2. The second … Continue reading Taking MySQL dumps with a twist

Mysql temporary tables and replication

MySQL and replication, it has always been a touchy subject. Overall, things work properly. Non the less, on a certain project, we experienced regular replication failures: Error ‘Can’t create table ‘db.temp_table’ (errno: -1)’ on query. Default database: ‘db’. Query: ‘CREATE TEMPORARY TABLE temp_table … Basically the errors clearly points out that the temporary MySQL table … Continue reading Mysql temporary tables and replication

mysqldump: 1044 Access denied when using LOCK TABLES

A few days ago, I tried to make a backup using the mysqldump command and got the following error: mysqldump: Got error: 1044: Access denied for user ‘root’@’localhost’ to database ‘information_schema’ when using LOCK TABLES A quick workaround is to pass the –-single-transaction option to mysqldump: $ mysqldump –single-transaction -u user -p DBNAME > backup.sql … Continue reading mysqldump: 1044 Access denied when using LOCK TABLES

Set recursive permissions on only files or directories

Changing permissions can be tricky, because either way, permissions are on of the corner stones of security. It could be that you want to change permissions recursively on all folders, but not on files, and vice versa. Unfortunately, a lot of people don’t take that into account. So here’s a quick tip on how to achieve … Continue reading Set recursive permissions on only files or directories

Migrate from MySQL to PostgreSQL

Like a lot of developers, I’ve been watching the movement of MySQL since it has been acquired by Oracle. Since the acquisition, a lot of MySQL forks have been created. Think of MariaDB and Drizzle. I’ve also been looking at PostgreSQL. Since long, I’ve wanted to start personal project using PostgreSQL. So I decided to migrate … Continue reading Migrate from MySQL to PostgreSQL

Creating Debian packages with checkinstall

Lately I’ve been working on automating my server infrastructure. One of the tasks at hand was to simplify the way I install certain software. For instance, for my web-stack, I compile ruby and nginx manually, so I can compile them using specific parameters. When I started researching this, I got overwhelmed with all different kind … Continue reading Creating Debian packages with checkinstall

Configuration management with Ansible: Playbooks & Execution

In my previous post, I described how you could setup Ansible. At this point, you are able to send commands to your hosts. Although running ad hoc tasks is useful, I won’t be covering that here. If you want to know more about running command line ad hoc tasks check out the detailed examples on … Continue reading Configuration management with Ansible: Playbooks & Execution