MySQL 5.7 Community Contributor Award Program 2015

Hi,

Some days ago, i tried to beat the Mysql 5.7 optimizer in the challenge launched by Morgan Tocker in this blog post : http://www.tocker.ca/2015/07/15/the-mysql-5-7-optimizer-challenge.html

And i beat it ! So i won a polo and put my name close to great people that i follow every working day in this blog post from Oracle : https://blogs.oracle.com/MySQL/entry/mysql_5_7_community_contributor

😛

Percona Toolkit on Windows

Percona Toolkit contains a lot of useful tools for DBA. Most of the tools works fine under Windows, but the implementation of Percona Toolkit in Windows is a little trickier than in Linux world.

Here is the list of the tools i’ve used successfully under Windows :

pt-variable-advisor : Advices on configuration problems
pt-deadlock-logger : Logs the deadlocks
pt-duplicate-key-checker : Shows duplicates keys
pt-query-digest : Format the slow query log
pt-slave-delay : make a slave lag behind master
pt-table-checksum : Checks replication integrity
pt-table-sync : Repairs broken replication

If you want to use PT on Windows, the first step is to download a perl environment for Windows, personaly i use Strawberry Perl. Installation is as simple as “next”, “next”, … , “finish”. DBD-MySQL which is a required library for PT is installed by default with this distribution.

After this step, you can use PT from the command line :
C:\Percona Toolkit>perl pt-variable-advisor -uroot -ppwd localhost

So, what’s the problem ? Tools like “pt-deadlock-logger” or “pt-slave-delay” have sense when they are daemonized – or in Windows terms – when they run as a service ! Percona Toolkits has the option “–daemonize” but unfortunatly this is a linux only feature.

The solution is NSSM, here is the “HowTo” for pt-slave-delay !

From the command line
C:\>nssm install SlaveDelay

Application tab :
Path : C:\Strawberry\perl\bin\perl.exe
Startup directory : C:\Percona Toolkit
Arguments : pt-slave-delay –delay 2h -uroot -ppwd localhost

Details tab
Description of the service and startup type

I/O tab :
stdout : C:\Percona Toolkit\log\SlaveDelay.log
stderr : C:\Percona Toolkit\log\SlaveDelay.log

Then “Install service”

From the command line :
C:\>net start SlaveDelay

Note :
– NSSM included in Strawberry, but it’s an old version so i suggest you to download the lastest version at https://nssm.cc/.
– Full help on NSSM here : https://nssm.cc/usage
– Full help for percona toolkits : http://www.percona.com/software/percona-toolkit

Et voilà !

Marc.

Poor lonesome DBA

Hi !

This is my first blog post, so why this blog ?

Sometimes i feel like a poor lonesome DBA like Lucky Luke (Belgian comics) feel like a poor lonesome cowbow at the end of the day…

I’m working on MySQL and now MariaDB for 10 years in a french company. And the thing is, exclusively on Windows… absolutly !

So why i’m feeling like a poor lonesome DBA with MySQL on Windows ? Because there are not so much ressources around MySQL on Windows 🙂

A lot of project around MySQL are Linux centric (Percona only makes builds for linux builds, some projects of MariaDB like maxscale are (for now) linux only..)

I want to share some things i learned, some things i made for MySQL on windows but not only.

Stay tuned.