Community journal

The latest from the MySQL community

Ideas, releases, practical guides, and perspectives from the people building with MySQL.

Follow the feed
Showing entries 33226 to 33235 of 45354 « Previous | Next »
Mysql Error

I was running an import script today taken from a mysqldump from another user, when I saw an error that looked like this:

ERROR 1005 (HY000) at line 123: Cant create table
 (errno: 150)

This is caused by a mysqldump or export process exporting tables in alphabetical order and not in the order in which they rely on one another. My tables had foreign keys which fail on import if the other table doesn't exist when you create the table with the key. In this case I was only importing six or eight tables so I simply opened the script in a text editor and re-ordered the import blocks. On a bigger scale a more technical solution might be required!

Lorna is an independent web development consultant, writer and trainer, open source project lead and community evangelist. This post was originally published at LornaJane

Even faster online backup!

I discussed my findings with Guilhem Bichot, one of the online backup creators, and he remarks:
You could also try
export MYISAM_BACKUP_NO_INDEX=1

before starting mysqld. It should not backup index (and rebuild them at repair time). Should make a smaller backup and a longer restore.
I am not really looking for a longer restore, but let's give it a try. I restarted the database with the suggested option, and here is what I got:



backup database employees to 'emp2.bkp';
+-----------+
| backup_id | …
[Read more]
MySQL's Marten Mickos: No one can imitate our culture

Things have been quiet from MySQL over the past month or so, but today's Wall Street Journal has an awesome interview with Sun's Marten Mickos, perhaps the most quotable technology executive on the planet.

I really like how he talks through community (how to provide incentives, what to ...

Chattin' with The Linux Foundation's Executive Director, Jim "Led" Zemlin

I'm back from my week of vacation and am ready to pick up where I left off with the interviews I conducted at the Red Hat Summit/FUDCon last month.  After today's, I will have three left: Dennis Gilmore, Max Spevack and Chander Kant of Zmanda.

The Honourable James Zemlin

On the first day of the Summit I was able to grab my buddy Jim Zemlin, the Executive Director of the Linux Foundation for a spirited discussion about the Foundation, Linux and a bunch more. 

My interview with Jim (15:55)  Listen (

[Read more]
Calculating Percentiles with MySQL, Round 2

My previous post on calculating percentiles with MySQL generated some comments and good discussion. In particular, I got some very interesting comments from Vladimir.

Basically, Vladimir was doubtful whether the GROUP_CONCAT() solution would be optimal in comparison to a JOIN. His proposal is to solve it like this:


SELECT SUM(g1.r) sr
, g2.length l
, SUM(g1.r)/(SELECT COUNT(*) FROM film) p
FROM (SELECT COUNT(*) r, length FROM film GROUP BY length) g1
JOIN (SELECT COUNT(*) r, length FROM film GROUP BY length) g2
ON g1.length < g2.length
GROUP BY g2.length
HAVING p > 0.9
ORDER BY p
LIMIT 1


First, this query sets up two identical subqueries in …

[Read more]
Faster online backup with MyISAM driver


Remember the first test of online backup? I tested the new feature, which was performing quite well, compared to mysqldump. OK. Get ready for a surprise.
I tested the native MyISAM driver from the mysql-6.0-backup tree, and I compared the results with the normal backup.

version backup time restore time
standard 25.58 79.11
MyISAM driver 4.15
[Read more]
New XAMPP version for Linux, Windows, and Mac OS X

It's finished. After the usual two-week beta period, we can announce the new "final" XAMPP version available for public download.

In this version we updated: Apache (2.2.9), MySQL (5.0.51b), PHP (5.2.6), phpMyAdmin (2.11.7), mod_perl (2.0.4), OpenSSL (0.9.8h), and eAccelerator (0.9.5.3).

Get the downloads and more details on the specific platforms XAMPP project page.

Neue XAMPP-Versionen für Linux, Windows und Mac OS X

Es ist vollbracht. Nach der üblichen zweiwöchigen Beta-Phase können wir heute die neue "finale" XAMPP-Versionen zum öffentlichen Download anbieten.

Aktualisiert wurden in diesem XAMPP: Apache (2.2.9), MySQL (5.0.51b), PHP (5.2.6), phpMyAdmin (2.11.7), mod_perl (2.0.4), OpenSSL (0.9.8h) und der eAccelerator (0.9.5.3).

Die Downloads und genauere Details zu den neuen Versionen gibt es auf der jeweiligen XAMPP-Projektseite.

Two 5.0 bugs in a day

I filed these two MySQL bugs today:

Bug#37910 Dropping unrelated index fails if fk on first col
Bug#37925 Select with comma join pretends a column does not exist

They originate with clients, and occur on recent 5.0 versions. No fatal stuff, but annoying. Both are of the fairly awkward variety and I'm curious why they still exist so late in the 5.0 series.

For instance, the second one looks like a parser bug, and I'd have figured someone tripping over this ages ago. It's actually a regression as it worked fine in 4.x, the testcase is directly from an app that was in production on a 4.x server, then upgraded to 5.0. Kaboom on this. Quite unexpected, and very annoying as going through the entire app changing the join syntax is a bit of a pest for the developers.

[Read more]
PDO_MYSQLND: Monday morning murders

I am a member of the monday morning murder association. I murdered bugs. As said earlier, the modification of PDO_MYSQL to support both the MySQL native driver for PHP (mysqlnd) and the MySQL Client Library (AKA libmysql) is progressing. A good number of known and unknown bugs has been killed. But some new have been found as well - an overview.

(...)
Read the rest of PDO_MYSQLND: Monday morning murders (754 words)