Yahoo's MySQL Partition Manager is Open Source
At Yahoo, we manage a massive number of MySQL databases spread across multiple data centers.You can check out the original anoucement at the MySQL@Yahoo blog and the code at its github repo.
We have thousands of databases and each database has many partitioned tables. In order to efficiently create and maintain partitions we developed a partition manager which automatically manages these for you with minimal pre configuration.
Developing a MySQL Workbench plugin
Having said that, most of the provided functionalities are intuitive and of daily use for developer and DBA staff alike. Moving beyond this rich out-of-the-box features set, Workbench empowers it's users to extend and develop their own custom features. For this purpose, we use both of the following:
- GRT: Generic RunTime is the internal system used by Workbench to hold model document data. It is also the mechanism by which Workbench can interact with Modules and Plugins.
- MForms: MForms is a small GUI toolkit library written for use in the MySQL Workbench project.
I've developed a small proof of concept to learn how to code a custom plugin. The purpose is to provide a simple refactoring feature for the script on the SQL editor (basically it's a find and replace):
To briefly explain the code, first we import all of the workbench (wb) modules, grt and mforms:
# import the wb moduleThen we declare the module information, its name, author and version:
from wb import *
# import the grt module
import grt
# import the mforms module for GUI stuff
import mforms
# define this Python module as a GRT module
ModuleInfo = DefineModule(name="Refactor", author="mjlmo", version="0.1")
@ModuleInfo.plugin("wb.text.refactor", caption = "Refactor Selection", input=[wbinputs.currentQueryBuffer()], pluginMenu= "SQL/Utilities")Finally, we insert the code to perform tha task in hand, in this case replace a selected text on the SQL editor with a given one on an input box. If there is no text selected, a message box will appear on screen stating that. Otherwise, we proceed with the refactoring operation.
@ModuleInfo.export(grt.INT, grt.classes.db_query_QueryBuffer)
To install this plugin, simply open MySQL Workbench, choose the "Scripting > Install Plugin/Module ..." option, browse to the "refactor_grt.py" file location and open it. Close and re-open the tool. There should be a new option on the "Tools > Utilities" menu called "Refactor Selection". Also, the plugin appear on the plugin manager:
You can read another full example regarding MySQL Workbench on how to define a module and define a plugin in Python here:
http://mysqlworkbench.org/workbench/doc/
Print tab separated values as table using MySQL
shell> mysql -u your_user -p < your_statement.sql > data.csvI came up with the following python script to grab the output file and pretty print:You can put your own filename instead of 'data.csv'. And of course, this script also works for other TSV files that don't come from mysql. To run the script you should install the python tabulate package:
https://pypi.python.org/pypi/tabulate
mysqlpump — A Database Backup Program
- Parallel processing of databases, and of objects within databases, to speed up the dump process
- Better control over which databases and database objects (tables, views, stored programs, user accounts) to dump
- Dumping of user accounts as account-management statements (CREATE USER, GRANT) rather than as inserts into the mysql system database
- Capability of creating compressed output
- Progress indicator
- For dump file reloading, faster secondary index creation for InnoDB tables by adding indexes after rows are inserted
... mysqlpump is not currently consistent. That is to say that currently each of the dump threads lack a synchronization point before they start backing up the data. This makes it currently unsafe as a general purpose backup replacement.Happy testing!
Securing your MySQL server
Fortunately MySQL and MariaDB already come with a tool for that purpose, called mysql_secure_installation. This program enables to perform the following improvements to the security of your installation:
- set a password for root accounts.
- remove root accounts that are accessible from outside the local host.
- remove anonymous-user accounts.
- remove the test database (if exists), which by default can be accessed by anonymous users.
Be advised that as of MySQL 5.7.2, this tool is an executable binary available on all platforms. Before version 5.7.2, it was a script available only for Unix and Unix-like systems.
Invoking the tool without any arguments:
shell> mysql_secure_installationThe script will prompt you to determine which actions to perform:NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we'll need the current
password for the root user. If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.
You already have a root password set, so you can safely answer 'n'.
Change the root password? [Y/n] n
... skipping.
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y
... Success!
By default, MySQL comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] y
- Dropping test database...
ERROR 1008 (HY000) at line 1: Can't drop database 'test'; database doesn't exist
... Failed! Not critical, keep moving...
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MySQL
installation should now be secure.
Thanks for using MySQL!BrowserSwarm - A tool that automates JavaScript testing across browsers
BrowserSwarm is a partnership by Microsoft, Sauce Labs and the open source team of appendTo that helps developers automate how they test frameworks & libraries across browsers. It’s powered through the cloud, allowing developers to save time setting-up multiple browser or device testing environments and precious server resources.
BrowserSwarm connects directly to your GitHub code repo. When your team makes updates, BrowserSwarm automatically runs your project's Unit Test Suite and supports Frameworks, like QUnit, in the cloud using SauceLabs browser automation.
BrowserSwarm is meant to help the framework authors that build stuff for developers by reducing the time spent testing.
Check the original post by Microsoft here.
Site: BrowserSwarm
Rapidly test your website for cross browser compatibility
- Limited offer: 25% off Parallels Desktop 8 virtualization for Mac.
- New virtual machines for testing IE11 on Windows 8.1 and Windows 7.
- A new, free screenshot tool that lets you see how a site looks across browsers and devices.
You can check out the live output here: http://www.browserstack.com/screenshots/5a6283df1308512082589290b4add4dcd6b9b35f
To run the tool on any site of your liking, visit BrowserStack.
TFS: pending checkin from missing computer
On TFS, to solve these issues, you can use the TF.EXE command line tool. To use it you should open a command prompt window:
After opening the command prompt, you need to have identified the following information:
- Name of the computer where the workspace used to be hosted;
- Windows username used to logon to Team Foundation Server;
- The TFS Web URL
Microsoft Security Tools and Guidance
A modern attack performed by APT is the “Pass the Hash”. According to a whitepaper from Microsoft, while performing a PtH attack, an attacker obtains elevated read/write permission to privileged areas of volatile memory and file systems, which are normally only accessible by system-level processes on at least one computer. Second, the attacker attempts to increase access to other computers on the network by:
- Stealing one or more authentication credentials (user name and password or password hash belonging to other accounts) from the compromised computer.
- Reusing the stolen credentials to access other computer systems and services.
This sequence is often repeated multiple times during an actual attack to progressively increase the level of access that an attacker has to an environment.
Regarding free assessment tools from Microsoft, as well as protection software, there’s a really nice compilation on the “Irish IT Professional” technet blog. You get to know tools like Microsoft Security Compliance Manager, Microsoft Baseline Security Analyzer and Microsoft Security Assessment Tool.
Regarding security tools for footprinting, internal auditing anf guidance, you should check out the Security Tools Community Edition page, on Microsoft’s Technet Wiki.
Finally, you might want to follow the Microsoft Security Blog.
Photo Credit: JustEvents via Compfight cc
Testing sites for Internet Explorer made easier
Today Microsoft announced a new set of tools to help you support modern and older versions of Internet Explorer.
The site makes available a scanning tool that, provided a URL, detects common coding practices that may cause compatibility problems or prevent your users from getting the best possible experience on a webpage rendered on IE. For instance, I ran the scanner on this blog and the report was as follows:
A common problem from supporting old versions of IE was detected. The scanner found that the blog webpage was currently rendering in a Compatibility Mode on Internet Explorer 9 and 10, due to the following tag:
<meta http-equiv="x-ua-compatible"
content="ie=emulateie7">Other “nice to have” issues were detected like a lack of responsive design and no Windows 8 features like a touch browsing interface or a live tile for the start screen.
After removing the compatibility tag, the common problems were all fixed.
Another interesting part of this site is that virtual machines are made available for both Mac and Linux developers to download and be able to test their Web applications on Internet Explorer, using various versions of the windows operating system and the browser:
Finally I leave you with the insights from two IT professionals about how challenging it is to develop web application given the number of browser and client devices that exist:
Modern IE Homepage: http://www.modern.ie/
Microsoft Office 2013 Proofing Tools
If you’re beginning to use the new Microsoft Office 2013 and your native language isn’t English, you’ll surely want the new proofing tools.
You can download them from this page at Office Online. Afterwards, install it and restart any open applications from the Office suite.
You’re all set to go.
Kanban Software Development
Kanban literally meaning "signboard" or "billboard", is a concept related to lean and just-in-time (JIT) production. According to its creator, Taiichi Ohno, Kanban is one means through which JIT is achieved.
Kanban is not an inventory control system. It is a scheduling system that helps determine what to produce, when to produce it, and how much to produce.
In Agile software development, it has become a common practice to visualize and share project status by posting cards on a wall of the project room.
On the board, project tasks are represented by Post-It notes, and the status of each one is indicated by posting to separate areas on the board labeled "To Do", "In Progress" and "Done". This Kanban Board helps visually signal tasks and limit the volume of tasks actively being worked on, optimizing the teams focus.
KanbanFlow is a Lean project management tool allowing real-time collaboration between team members. Supports the Pomodoro technique for time tracking and best of all, it's absolutely free.
If you are engaged on a software project as a team leader, you can use this tool to coordinate the group's effort. If you're a developer you can use this individually to break down your tasks or propose it to the project manager for adoption.
Compress PDF file with embedded images
- File size constraint: a submitted file cannot be larger than an admissible threshold.
- file type unification: a single file type, or a reduced set of types, should be enforced.
Free resources for media standout
Making an appealing presentation or sales pitch is not that hard anymore, as long as you have good communication skills and use the right resources.
On this post, I share with you three nice suggestions from the people at Slides that Rock:
- Compfight: Compfight is a Flickr image search engine.
- Font Squirrel: Quality freeware fonts that are licensed for commercial work
- COLOURlovers: COLOURlovers is a creative community where people from around the world create and share colors, palettes and patterns, discuss the latest trends and explore colorful articles.
Microsoft Team Foundation Server - Antivirus folder rule out
The bad news are that if a fine tuning and folder rule out policy is not in place, the database servers and application server will have their performance seriously compromised. The On-access scan feature will perform its own DoS attack on the hosts.
According to the server role, the adequate folder need to be ruled out from the malware scanning engine.On this specific post, you can find a lead on what folders should be ruled out on a Microsoft Team Foundation Server.
On the database server (MS-SQL) you should obviously rule out the path to the data volumes (.mdf and .ldf files) supporting the TFS.
On the actual TFS server, the following folder should be ruled out:
- C:\Program Files\Microsoft Team Foundation Server 2010
Test open network ports using Powershell
Commonly this is performed using a command line and issuing a “telnet” connection to the desired host on a given port. This is nice when you have a single machine with a couple of connections to be tested.
When the scenario involves tens of machines with different network connection requisites between each other, the telnet procedure is a very slow process, being the typical test cycle:
- Open command prompt.
- Issue telnet to a given host and port.
- On success, close window and return to step 1.
- On failure, wait for timeout.
- Authorize the network port that failed
- Repeat step 2.
- On success go to step 1.
- Open command prompt.
- Issue command or script to test all destination hosts on desired ports.
- Check status and authorize failed network traffic.
- Repeat step 2 and check for success.
To surpass these annoyances, one can use this Powershell function “Test-Port”, available from the Microsoft Technet Script Center Repository.
The syntax of the base usage is really simple. To test conecctivity to this site:
Test-port -computer blog.ozzie.eu -port 80
To address the fact of the ever growing shared network resources to be tested, an Excel spreadsheet can be used to generate the test battery script. Here’s an example you can view and download:
Afterwards, you just copy/paste the powershell column to a .ps1 file. I’ve also included a regular command prompt test column.
HTH.
Cartão de Cidadão – APIs de Desenvolvimento
Esta aposta confirma-se com a publicação no Diário da República da Resolução do Conselho de Ministros nº.12/2012, de 7 de Fevereiro de 2012 que aprova o plano global estratégico de racionalização e redução de custos com as TIC na Administração Pública, apresentado pelo Grupo de Projeto para as Tecnologias de Informação e Comunicação (GPTIC).
Posto isto, é relevante fazer um levantamento do que existe actualmente que posa servir de base e acelerar o desenvolvimento da integrações do Cartão de Cidadão nas aplicações.
Numa pesquisa pouco exausta na Internet, aparecem os seguintes projectos:
O middlware do cartão é sempre necessário, de modo que na realidade apenas enumerei um projecto de terceiros que age com um wrapper .NET que expõe a API de interacção com o smart card.
Fica aqui o desafio de colocarem nos comentário a a esta mensagem algum projecto que conheçam ou usem e não esteja entre os referidos.
LibreOffice spellcheck not working - try this
I couldn't find anything on the options manager that put spellcheck to work. Finally, inside the word processor, I selected "Tools > Languages > More Dictionaries Online":
It opened a browser window on a OpenOffice Wiki page. After searching a while, I landed on the following URL: http://extensions.services.openoffice.org/en/dictionaries
I downloaded the extension corresponding to my desired language, a .OXT file, opened with the LibreOffice extension manager and installed it.
I restarted the Word processor and it just worked. HTH!
Tomboy sync using Windows and Ubuntu
If we're talking about utilities like Dropbox, it already supports synchronization clients for windows, Mac and Linux.
On this specific case, I wanted a decent note taking application that allowed me to sync between my Windows desktop at work and my Ubuntu laptop at home. A suggestion I found on the Web worked on file based software and Dropbox synchronizing those folders. That might work, but
The first step, if you don't have such an account, is to register on Canonical's Ubuntu One service. It gives you 5GB free storage to sync files, contacts and notes on all your Ubuntu machines. It's meant to support Windows OS soon enough.
The second step is to install Tomboy on the Windows machine. To install Tomboy on Windows, you need .NET framework and gtk-sharp installed before you can install Tomboy:
After installing Tomboy, start the application. It automatically sets up an icon on the system tray. Press the right mouse button on it and choose "Preferences".
Go to the "Synchronization" tab and select the "Tomboy Web" service. Ont the server insert the following address: https://one.ubuntu.com/notes/
Choose the interval between synchronizations. press "Save" and you're all done on the Windows box. For the Ubuntu machine, there is this detailed tutorial on notes configuration on the Ubuntu One wiki pages.
Free alternative to XML Spy
Not having acquired a commercial software like XML Spy, I had to find a free alternative. To open XML files, pretty-print them and check for issues, I adopted XML Copy Editor:
XML Copy Editor is a free editor that enables you to:
- open XML files
- edit your own XML
- check if the XML is well formed
- check the XML for compliance with a given schema



