Archives For MySQL

In 2008, Sun purchased MySQL for a reported $1 billion (US) and Sun has since been purchased by Oracle. Monty Widenius, the original creator of MySQL, has since left Sun, apparently over philosophical differences. In particular there seems to be a difference of opinion when it comes to the appropriateness of the 5.1 release of MySQL (i.e., was it too buggy for public release). Widenius is now working on MariaDB, an offshoot of MySQL that uses the Maria storage engine (aka table type) by default. This is definitely a project to keep an eye on, as MySQL users will logically move to MariaDB if they do find MySQL to be increasingly unstable or they just disagree with how Sun/Oracle is managing the product. As with many things, the popularity of MariaDB will partially depend upon the adoption rates by hosting companies. Or, for those that do stick with MySQL, version 6 will include support for the Maria storage engine. See this page for more on MariaDB compared with MySQL.

The intention behind MariaDB is to release free and stable, but very similar, alternative to MySQL. The Maria storage engine is a crash-safe version of the MyISAM table type but Maria still doesn’t use transactions (like InnoDB). Version 1.5 of MariaDB is now in beta, with the focus on stability. Version 2 of Maria should include transactions and ACID compliance. Version 2.5 is where the developes intend to really focus on performance. This may seem a little backwards, but it’s much easier to retroactively improve software performance than it is its quality.

JetProfiler for MySQL

March 22, 2009

I’ve just recently come across a piece of software called Jet Profiler for MySQL. This is a program that runs on Mac OS X, Linux, and Windows (it’s runs on Java), and comes in both a free and commercial version. Jet Profiler for MySQL is a diagnostic tool, used to analyze and report upon your database’s performance, specifically in terms of the queries run, the tables used, and the MySQL users. It also has more advanced capabilities, like reporting upon master/slave relationships, locking, threads, and so forth. One particularly interesting feature is that it doesn’t require any special server configuration; in fact, it doesn’t even need to be installed on the server. You can install the application on your desktop computer, create a new MySQL user on the server, and the software will connect through it. Software like this is another good way to better understand your database and your Web application.

Recreating MySQL Databases

January 31, 2009

One of the more common MySQL-related questions I get is how to transfer a database from one computer to another, or just how to recreate one in general. There are command-line tools that come with the MySQL server expressly for this purpose (mysqldump and mysqlimport). However, most people prefer to avoid using command-line tools, if they can. You can also use the GUI MySQL Administrator. This application has Backup and Restore options. (I write about the MySQL Administrator in my MySQL, Second Edition (Visual QuickStart Guide) book.) That’s a fine application, but you may not be able to run a GUI tool on the destination server (e.g., a hosted Web site). What I almost always use is phpMyAdmin. This Web-based PHP interface to MySQL is installed on pretty much every hosted server and you can quickly install it on your own computer as well. Here’s how you would use it… Continue Reading…

Later this year I’m going to write an e-commerce with PHP and MySQL book for Peachpit Press. This is a topic that’s often been requested by my readers and one I’m happy to finally address. I have written e-commerce chapters in my PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide and PHP 5 Advanced: Visual QuickPro Guide books, but not to this extent. Specifically, those examples were unable to demonstrate the payment gateway system, as that’s so particular to each individual situation. This new book, whose title is still being determined, will cover everything you need to know to create an e-commerce site using PHP and MySQL. I’m going to describe my intentions for the book here, then ask for any questions, comments, and suggestions that you, the potential reader, may have.

UPDATE: I’ve just posted the rough table of contents. My apologies for the delay on this and my sincerest thanks to those interested in the book!

Continue Reading…

MySQL Workbench

January 20, 2009

I haven’t formally written about MySQL Workbench in any of my books (I don’t think), but wanted to give it a quick mention here. MySQL Workbench is a visual database design application (an entity-relation/modeling tool) for creating and managing database schemas. It runs on many operating systems and is being released in both free and commercial versions.

If you haven’t used a visual database design tool before, you’ll need to spend some time reading up on it. The application can be used to design and then create new databases or create documentation for existing ones. This kind of software is especially useful if you:

  • prefer visual design tools
  • may need to create databases on one server, then recreate them on another
  • want to package along an excellent resource when turning a site over to a client

MySQL Workbench is currently in an alpha release. That means not all of its features are quite there yet and the documentation will need to be much improved (some of the links on MySQL’s pages seem to be inconsistent). But if you have some spare time, you may want to play with this now. If you don’t have the time, or prefer more developed software, keep the MySQL Workbench in mind for later in the year.

On MySQL’s Web site, you can find links to download the software for Windows and Linux. An alpha version for Mac OS X was released just before Christmas. I didn’t find any obvious links to it on the MySQL Web site, but did find them at this post.