Ever found yourself changing permissions recursively and then realise you used the wrong permissions? Unfortunately, I have. Don’t know if it was due to lack of sleep or caffeine but it just did. Due to my bad handling, I had a few folders where the permissions got screwed up. The folders that I needed to … Continue reading Recursively fix bad file permissions
Category: Operations
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
A lot of times, developers are asked to export data from a MySQL database to hand over to a client. In most of the cases, when tools like phpMyAdmin are available, the data is exported through the web tool. But when no such tools are at hand, developers most likely turn to their developers skills … Continue reading Export directly from MySQL to CSV
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
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
Having a dynamic IP-address at home, I sometimes need to lookup what my public IP is. There plenty of choices in sites that will display your remote IP. But it’s always such a hassle. I never remember one specific site, so I always pass Google and most of the time, I don’t have a browser … Continue reading Show your public IP from the command line
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
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
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
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