MySQL Gotchas

Anyone using MySQL as a primary or secondary database system must checkout the MySQL Gotchas (a list of features or functions which work as advertised - but not as expected).

MySQL can be accessed from VB.NET using some managed class libs like MySQL Connexion, dotData or ADO.NET ODBC itself. I've also used the MyVbQL API component for accessing MySQL from VB 6.0. Its thin, efficient and works well with unmanaged code. MyODBC on the other hand seems a little bulky (IMO) and slower, specially for distributed applications.

Before designing the data access layer (over MySQL), be sure to read Exploring MySQL in the Microsoft .NET Environment.

2 Comments

  • The two things that surprised me on working with MySql - no Stored Procedures, and corrupted indexes. The corrupted index thing is a killer. I was filling in at a PHP / MySql shop when all their sites went down at once; it turned out their custom CMS database had index corruption which brought the whole thing down. I was amazed that a database server system wouldn't auto repair corrupted indexes, as SQL Server does.

  • I heard that SPs (and Triggers) will be introduced in the next major release (5.0). You are right, without auto-repairing of indexes it can get pretty messy. For now, I usually setup a CRON job (if DB Server is a Unix box) or Windows Scheduler task (if DB Server is a Windows box) to trigger/run a PHP or ASP script every week or so, and this script uses the mysqlcheck command to check & repair the indexes on some/all tables. Crude but works well in an unattended environment.



    Some clients with a tight budget prefer MySQL over MSSQL so as long as that's the reality we developers will have to find solutions to such problems.

Comments have been disabled for this content.