How to create a spell check enabled MySQL query by leveraging SOUNDEX and Levenshtein Distance algorithms

Recently I came across a situation where I needed to perform the MySQL search in such way, that it would account for typos in user search queries. For example, if the database of words in MySQL contained only the word “assistance” and the user typed the misspelled word “asistence”, I had to be able to return the correct word “assistance” as a closest possible suggestion from the database. It seemed like a trivial task at first, but it took me quite a while to figure the SQL query that had a good balance between performance and overal quality of results.  [Read more…]

MongoDB and BSON format

Recently I came across a statement that said: “MongoDB (btw. that’s MongoDB) uses the BSON format which extends the JSON model to provide additional data types” and I think this topic deserves a bit of clarification. [Read more…]

Local vs Distributed Databases

In this article, we’ll analyze the situations in which it is more appropriate to implement a distributed database instead of a centralized (local) database. But before we do so, let’s see how the two of the database concepts differ. [Read more…]

How to fix “Warning: PDO::__construct(): The server requested authentication method unknown to the client [mysql_old_password]” authentication error

This article describes how to fix MySQL connection error: (“Warning: PDO::__construct(): The server requested authentication method unknown to the client [mysql_old_password]”), experienced during MySQL or MariaDB authentication (typically during establishing a database connection). [Read more…]

Windows Batch File: How to Backup MySQL to WinRar passworded file and upload it to SkyDrive

Following is a batch file I’ve created to backup my MySQL database. It compresses the backup to a passworded WinRar file. Which is then uploaded by the same batch file to my free 25gb Microsoft SkyDrive account (you can use any cloud storage provider which can be mapped to drive letter). Batch script then automatically names created backup using the current date and time stamp. It then deletes all WinRar files older than 30 days on SkyDrive, thus rotating backups for me automatically. Batch file can be scheduled to run as often as needed. [Read more…]