rc3.org

Strong opinions, weakly held

Tag: mysql (page 2 of 2)

Links for August 31

Links from June 8th

Why is MySQL more popular than PostgreSQL?

Why is MySQL more popular than PostgreSQL? The fact that it is more popular is indisputable — take a look at MySQL’s market share page. My experience with PostgreSQL is very limited and my strongest impression was that the command line client has a weird interface, beyond that, I know little. PostgreSQL advocates are pretty convinced of its superiority over MySQL on every level.

PostgreSQL was released in its current form in January 1997. MySQL was initially released in May 1995, but the first version that saw really wide adoption — version 3.23 — came out in January 2001. I’ve always used MySQL but I never made an affirmative decision to choose it over PostgreSQL. Is there a reason why MySQL is more popular other than the power law reasons? What gave it the initial edge in adoption?

Update (5/21): This post is also being discussed at Hacker News. Check out the discussion there as well.

The inevitable MySQL fork

MySQL is near and dear to my heart — I use it for just about every project I work on. And like many people, Oracle’s acquisition of Sun leads me to worry about MySQL’s future. However, I’m not sure that the new MySQL fork from Percona and Monty Program Ab will lead us to the promised land.

What scares me most is that the new database will not support InnoDB. That makes sense, because InnoDB was already an Oracle property even before the Sun acquisition, but moving away from it will be scary for many users. Time to figure out whether Primebase XT is ready for prime time, I suppose.

Update (May 20): MariaDB will support InnoDB. See the comments.

Truth in advertising

You have to appreciate the honesty of MySQL’s Michael Widenius:

Don’t expect that all critical bugs that you may have encountered in 5.0 to be fixed in 5.1. Even if we have fixed a big majority of the bugs from 5.0 some really critical ones still haven’t been addressed.

The quickest route from database results to CSV

I’m wondering what the quickest route is from the results of a SELECT statement in the MySQL command line client to a CSV file that can easily be imported into Excel. Using INTO OUTFILE is an option but only if you have the proper privileges and have access to the filesystem on the server. It won’t select into a file on the system where the client is running. (This seems like a huge oversight to me.)

There are also GUIs (like phpMyAdmin) that provide this functionality, but lots of systems administrators avoid it because of security holes.

Usually, I just whip up a Perl script to query the database and dump the results to CSV, but I’m wondering if there isn’t an easier way.

By the way, in researching this blog post, I noticed that it’s really easy to set your MySQL prompt to something much more useful than the default. For more, see the mysql client documentation. For now I’m going with (\u@\h) [\d]>.

Update: mysql -H -e "select * from whatever" > outfile.html dumps the results of a query in HTML format, which can easily be loaded into Excel. (Thanks, Erik.)

Links for April 19

Links for April 2nd

Newer posts

© 2024 rc3.org

Theme by Anders NorenUp ↑