mysql Archive

MySQL’s max_connect_errors … 6 years later…

Having recently been bitten by the awful default value (10) for max_connect_errors on a production server - I'm having a very hard time coming to terms with who the heck thought this would be a good way to do it. This type of "feature" allows you to effecitvely DOS yourself quickly...
Read More

MySQL command line – zebra stripe admin tool

I came up with a cool usage for the zebra stripe admin tool.  In MySQL you can set a custom pager for your MySQL CLI output; so one can simply set it to the zebra stripe tool and get the benefit of alternated rows for better visual clarity. Something like 'PAGER...
Read More

pt-online-schema-change and partitions – a word of caution

Just a quick word of wisdom to those seeking to cleverly change the partitioning on a live table using a tool like pt-online-schema-change from the Percona Toolkit. You will lose data if you don't account for ALL of your data's ranges upfront. (E.g: MAXVALUE oriented partition). The reason being is how...
Read More

MySQL COALESCE(), UNION behavior on zerofilled columns

I've just filed a (potential) bug report, depending on your views for MySQL's COALESCE() behavior: http://bugs.mysql.com/bug.php?id=65763 If you have a zerofill column and perform the COALESCE() function on it, the leading zeros are truncated. As I mention in the bug report, this may not matter to most - but it does change the...
Read More

On MySQL: The latest, far-reaching password circumvention

By now, everyone has, or will be hearing about this issue. While it's an extremely simple hack and covers (dare I say the majority) of MySQL installation version. Let's not forget to finish reading the entire disclosure: From the disclosure: But practically it's better than it looks - many MySQL/MariaDB builds are not...
Read More

MySQL 5.6 – InnoDB (innodb_file_per_table) and recovery

All I can say is rejoice!.There's a lot of fluff out there that beat around the bush or contain a regurgitated process for recovery using the 5.6 LAB edition of MySQL.So instead, here's the info straight from the horses mouth: http://blogs.innodb.com/wp/2012/04/innodb-transportable-tablespaces/  . This will make a huge difference in the...
Read More

MySQL – multibyte cheat sheet for conditionals

This is basically a short cheat sheet to launch some ideas for comparisons/matching with multibyte characters.Connection collation of utf8_unicode_ci and charset of utf8 - Table + data and server: [crayon-5c102c5279762210765079/][crayon-5c102c5279768202306722/][crayon-5c102c527976a975141306/][crayon-5c102c527976c809105439/]Check out the behavior of the following queries:[crayon-5c102c527976e929459124/][crayon-5c102c5279770700743927/]Other resources:MySQL's character sets and collations demystifiedMySQL charset documentationCharsets and joins (good gotcha to...
Read More

Is there a hacking campaign against open source?

Linux.com, kernel.org, mysql(twice this year), wordpress and php have all reported breaches of some sort this year. Is there some sort of campaign against these 'high profile' open source projects? It's starting to feel like it, to me.The more hands you get in the pot, the more nervous you should...
Read More

MySQL – max_allowed_packet – what is going on?

So there's enough noise in the MySQL community about what's covered well here (https://www.facebook.com/note.php?note_id=10150236650815933)Unfortuantely the bug is private for the time being; in my conversation with others, the general premise seems to be what good does max_allowed_packet really do? First off, I'd like to point out what seems to be what...
Read More

mk-heartbeat – sample conf file

There's not a whole lot (if any) documentation on what the file for the --config parameter for Maatkit's mk-heartbeat should look like.If you quickly pilfer through the source code, what it's looking for becomes pretty straight forward (It'd be nice to have this in the documentation, however).The config files are...
Read More

Nay say for ext2/ext3, seemingly ext4 for MySQL servers

 Basically I felt compelled to make a note regarding what filesystem to evaluate when you are performing a MySQL install. There seems to be a lot of reasons NOT to use the ext filesystems, and instead use XFS..This is a straight out quote from a MySQL at Facebook blog entry:ext-2...
Read More

Worthy of distribution: Reset root MySQL password

Oh snap! Need to reset your mysql root/admin (or any?) MySQL password? Well, you'll need root and control over MySQLd to some extent, but this is worthy of a rainy-day bookmark indeed: http://mysqlpreacher.com/wordpress/2011/03/recovering-a-mysql-root-password-three-solutions/ Subscribe in a reader...
Read More

MySQL 5.5.12 – init script warning

I've just reported a bug regarding the init script that comes in MySQL 5.5's source distribution .Basically, if you call the 'start' clause of the script twice it will hose the service by allowing multiple instances to run trying to utilize the same resources (pid file, socket and tcp port)...
Read More