Tag

mysql Archives - AWS Managed Services by Anchor

Why does Percona cause SSL issues in Postfix?

By | Technical | No Comments

When we came across this misbehaviour a little while ago we didn’t think too much of it. We unearthed the cause and worked around it, but ultimately dismissed it as an odd one-off. Since then it’s cropped up a few more times, and it doesn’t look like it’s going away, so we thought we’d tell a little more about it and what we’re doing to fix it. The segfault We use Postfix as our MTA on almost every Linux server in the company. As Anchor’s resident Postfix guru I often get asked for assistance when it comes to troubleshooting Postfix problems. I’ve seen plenty of them, so I can spot the most common issues and teach people how to fix them. Sometimes you run into something you haven’t seen before,…

Read More

Noop I/O scheduling with SSD storage

By | Technical | No Comments

Solid State Drives (SSDs) are not new in the server world, but they’re seen a somewhat limited takeup due to their high cost per gigabyte of storage. This has been changing as prices continue to drop, and we’re now at the point where SSDs represent a viable option for primary storage of high-value data that is read and written heavily. While SSDs are a drop-in replacement for traditional hard drives (HDDs) when it comes to servers, their behaviour and performance characteristics are fundamentally different. This means that the disk-access scheduling algorithms that we’ve developed over time, originally designed for rotational media, simply don’t work for SSDs. We recently observed some interesting behaviour as a result of changing disk access schedulers, which we thought we’d share with you here. The difference…

Read More

Inquisitio interrupta

By | Technical | 2 Comments

A customer’s Django app has been giving us hell for a little while now, something we’ve recently tracked down to dodgy signal-handling in some MySQL library code. Despite only showing up a dozen times in every 600 million queries or so, we’ve nailed it! It turns out the bug has been hanging around, on and off, for the better part of ten years now – that’s a long time! While it sounds simple on paper, it’s gone unfixed for so long because it only manifests in very specific conditions. Arriving at this conclusion was something of a surprise, but definitely worthwhile, so come join us on an adventure with surprises at every turn. The problem was first noticed by the customer, they get a mail when an exception goes uncaught….

Read More

State of the Union for MySQL storage engines

By | Technical | No Comments

(Feel free to skip to the next section if you’re familiar with MySQL’s storage engines) If you’re not familiar with MySQL’s storage engines, it’s where your data hits the disk. You write SQL to insert or query the data, and leave the rest to MySQL. MySQL arranges that data into files on the disk by using what’s termed a storage engine. The choice of engine affects how fast your data can be inserted/queried/deleted, how it’s indexed, and how robustly it’s stored. You don’t need to make a conscious choice – unless you explicitly specify, you’ll get the default of MyISAM. For many people this is fine, but it makes a difference when you start to accumulate a lot of data. If you’re after straightforward advice, skip down to InnoDB or…

Read More

A Simple MySQL Relational Database

By | Technical | No Comments

I’ve searched far a wide and all I wanted is a MySQL database schema that incorporated all the common relationships that tie into a relational database i.e one to one, one to many and many to many but haven’t had much luck. So here you go a straight to the point post that will give you: a fully functional MySQL databse schema along with inserted dummy data a relational database with common relationships such as one to one, one to many and many to many a list of example select queries to use to see how you can create table joins between tables To download the database please click here Diagram Of The Database The following diagram will help give you a good visual of all the tables in the…

Read More

# mysql_secure_installation… Ya-ha-! (and ~/.my.cnf)

By | Technical | No Comments

I was setting up mysql-server for a customer recently and noticed something interesting – there’s a helpful script included with mysql called mysql_secure_installation. We thought about that for a moment and had a chuckle. Okay, that was a little unfair; it’s no secret that we prefer to use Postgres wherever possible, but the idea of having a “make it all secure” script isn’t too bad an idea, as long as it doesn’t produce a false sense of security. The script does good things, but MySQL could probably be doing things better to begin with – make it more secure out-of-the-box, and the last thing they should be doing is shipping it with an empty root password. >_< It pains me to say it, but I think MSSQL probably comes with…

Read More