(The following applies to Apache 1.3. I've no idea whether it's still true in Apache 2 or not. Some of you will probably react to that news like I do to someone who's still not upgraded to MySQL 5.0, but there you are.) Ever been in a situation where you want all the files in a directory listed, even if one of them's named index.html (or whatever default you've specified as the default DirectoryIndex)? I banged my head against my monitor several times before I finally figured this one out. It's one of those things that's apparently too obvious to be mentioned in the Apache documentation, so I'll put it here: AllowOverride Indexes Options +Indexes DirectoryIndex /
(The following applies to Apache 1.3. I've no idea whether it's still true in Apache 2 or not. Some of you will probably react to that news like I do to someone who's still not upgraded to MySQL 5.0, but there you are.) Ever been in a situation where you want all the files in a directory listed, even if one of them's named index.html (or whatever default you've specified as the default DirectoryIndex)? I banged my head against my monitor several times before I finally figured this one out. It's one of those things that's apparently too obvious to be mentioned in the Apache documentation, so I'll put it here: AllowOverride Indexes Options +Indexes DirectoryIndex /
It has been said before, but it can't be stressed enough: The
binary log really is your friend. It just saved my life this week
after MySQL 5.0 completely crashed a table on an
ALTER statement.
The table crash was pretty nasty: A simple ALTER TABLE
table_name COMMENT='…' on a MyISAM table
rendered all the data useless. While table checks didn't show any
problems and the PRIMARY KEY seemed to be okay, the
content of all other data columns was just scrambled garbage. It
looked like MySQL completely mixed up the pointers to the data
fields.
As this table was in place (and probably unaltered) for a pretty long time (dating back to 4.0 or maybe even 3.23), this could have been a compatibility issue (we're on 5.0.18 right now) or maybe a hidden table corruption that didn't show up, even in table checks. So I posted a …
[Read more]I’ve never used Federated. I’m waiting for the JDBC version capabilities so I can connect to a non MySQL Server (specifically Oracle). In reading the docs, I see that the syntax includes a CONNECTION String.
CREATE TABLE federated_table (
id INT(20) NOT NULL AUTO_INCREMENT,
name VARCHAR(32) NOT NULL DEFAULT '',
other INT(20) NOT NULL DEFAULT '0',
PRIMARY KEY (id),
INDEX name (name),
INDEX other_key (other)
)
ENGINE=FEDERATED
DEFAULT CHARSET=latin1
CONNECTION='mysql://root@remote_host:9306/federated/test_table';
I’m surprised in the state of the syntax for two reasons.
- First, there are hardcoded variables in the string, this sort of breaks the rules of seperating syntax from authentication specifics …
We had the privilege of Brian Aker Director of Architecture for MySQL speaking at the Brisbane MySQL Users Group this week (28 th Jan 2006). After the initial discussions on various topics, Brian got into his discussion on MySQL 5.1. I was surprised that only 2 people (myself being one of them) had 5.1 installed and being used in any way.
Here were some of the highlights of the talk. Should have taken some more notes.
MySQL 5.1 Features
Partitioning Will include Range, Hash, List and Key handling and Subpartitioning. …
[Read more]
Besides many other bugs, the first beta release of phpMyAdmin 2.8.0
partly fixes a dangerous behaviour that could lock a database
with a complex VIEW, as mentioned in one of my
previous posts.
The problem was that phpMyAdmin did an explicit row count on
VIEWs on many occasions, for example every time a
new schema was selected. For complex VIEWs (with
JOINs on huge tables) this row count could take a
really long time and finally time out the browser, lock involved
tables and build up too many connections on a busy server.
How phpMyAdmin now deals with VIEWs
In the discussion on my bug report the phpMyAdmin developers …
[Read more]Let’s review the problem. I’ve got this on a number of occasions and different libraries. Here are some typical error conditions.
./mysql-workbench-bin: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.5' not found (required by ./mysql-workbench-bin) Error: Missing Dependency: libstdc++.so.6(GLIBCXX_3.4.6) is needed by package glibmm24
Special thanks to my new Guru friend Alfredo who put me on the path.
$ su - $ cd /src/rpm $ wget ftp://rpmfind.net/linux/fedora/extras/4/SRPMS/libsigc++20-2.0.11-1.src.rpm $ rpmbuild --rebuild libsigc++20-2.0.11-1.src.rpm $ cd /usr/src/redhat/RPMS/i386/ $ rpm -Uvh libsigc++20*.rpm Preparing... ########################################### [100%] 1:libsigc++20 ########################################### [ 50%] 2:libsigc++20-devel ########################################### [100%]
Woot! It was that simple, download the rpm source, …
[Read more]My freecycle email parser is now processing freecycle email and dumping metadata and email bodies into my MySQL database! Anyone interested in seeing the source?
When I started at eZ systems, one of my early conversations with the headquarters team was about how to serve the markets in North American. I advised that we follow the well-beaten path to Silicon Valley; send over a few solid team members from our HQ in Skien, integrate them into a strong team of Valley veterans and then work like mad to keep them from gutting our corporate culture in their pursuit of the market.
Perhaps this was good advice... For ambitious young tech companies, it seems that all roads lead to the Bay area. MySQL (who is now a customer :) made the trans-Atlantic hop to establish a major office in the area, as did Zend, Trolltech and a host of others. For them, it was a solid decison - the Valley is ripe with opportunity and they have done well with their choice.
... or maybe it was just plain dumb advice. When we started to really think about it, …
[Read more]So, you want some maintenance to run on MySQL, but you hate cron. Have no fear, events are here!
Here’s an example that came up in a work IRC channel for inserting a row on the last Tuesday of every month:
DELIMITER //
CREATE EVENT x ON SCHEDULE EVERY 1 DAY DO BEGIN
IF DAYOFWEEK(CURRENT_DATE)=3
AND
MONTH(CURRENT_DATE)<>MONTH(CURRENT_DATE + INTERVAL ‘7′
DAY)
THEN
INSERT INTO t VALUES (120);
END IF;
END//
You could also set it for EVERY 1 WEEK and omit the step of checking if it is Tuesday.
There is an article on events at http://dev.mysql.com/tech-resources/articles/event-feature.html
So what’s the catch? You need MySQL …
[Read more]