Today's pearl of wisdom:
MySQL dump files, as produced by mysqldump, are not text
files.
A common mistake is to think that mysqldump files are text files.
While they superficially look like text files, they in fact are
not. This leads to confusion and problems if people try to edit
them in a text editor application, which will in many cases cause
corruption.
MySQL dump files contain the SQL commands required to recreate
the contents of a database (or subset thereof). However, these
are SQL commands in arbitrary (binary) encoding and can consist
of a mixture of different encodings (e.g. if you have BLOBs).
This mixture is not safe to edit with a text editor, which
expects a text file to contain character data in exactly one
encoding (and will typically guess, ask the user or just use its
default to determine which).
Suppose you use utf8 data in your database - then your mysqldump
file …
I have finally managed to watch and slightly edit the September 2007 Boston MySQL User Group presentation I did on the MySQL Proxy.
It's geared towards beginners, and has lots of examples, including explaining some of the examples that come bundled with the MySQL Proxy.
Download video (.wmv file, 612 Mb)
Download video (.wmv file, 76.10 Mb)
Enjoy!
Some resources:
Presentation Slides PowerPoint (ppt) or PDF or …
|
Mark your calendars! On Thursday, December 13th at 15:00 CET (14:00 UTC, 09:00 EDT, 06:00 PST) I will host a session of MySQL University, on the topic of Introducing Lua for MySQL Proxy scripting. |
For those who missed the previous announcements, MySQL University is a series of online expert
lessons that you can join for free and attend from the comfort of
your home or office. The slides are provided in …
I spent way too much time this weekend trying to get the pager stuff in Drupal working for a module I`m playing with.
I had learned a lot from the watchdog module on how paging was supposed to be working and I was trying to do the same with another database. As I got a page limited by the number of records I wanted but I couldn't find any of the fancy next, previous and page number thingies that I wanted.
The watchdog module worked for me and I started stripping the
watchdog module till I could actually replace my function with
watchdog_overview function. Even replaced the watchdog query with
my qeury.. but not such luck.. I couldn't get $output .=
theme('pager', NULL, 50, 0); to work.
So as every open source geek does.. I started looking into the
code. pager.inc
The header told me the author.. I could mail him and wait …
Arjen wonders why the MySQl Cluster Study book is published on Lulu and not trough MySQL 's traiditional publisher.
Altough I was involved in the creation process of the mentionned
book, I have no idea why this decision was made but to me it
makes perfect sense. MySQL Cluster is a piece of software that is
still going to change a lot in the next couple of months and
years.
A book published in a traditional way needs a minimal sales
volume in order to be worth publishing. If there even is a slight
chance that by the time the book gets published a significant
amount of content of the book has already changed traditional
publishers shouldn't publish the book. Now over at Lulu.com a
book won't be print before a customer orders it. So when the book
is being sent to me. I get the current version of the book.. If
in 3 months the authors decide to rewrite a chapter or …
While researching partitioning performance (expect an article
about this topic soon) I come across the news that the Falcon
team has released a Falcon Feature Preview with the latest
implementation.
The test I was running was based on 9 server instances , using
different combinations of MyISAM, InnoDB, and Archive, with and
without partitions.
Since I was at it, I quickly added three instances of MySQL 6.0.4
with Falcon (MySQL Sandbox is really handy in these cases)
and added Falcon to the test bench.
As I expected, partitioned Falcon is not particularly impressive,
but there was a serendipitous result. In addition to large data
warehouse oriented queries, the test fires also 180 OLTP queries,
with warm indexes, i.e. after the indexes have been …
One of the concepts of clustering, is that the secondary node may
need to stonith the primary node in a forced take over in
order to make it give up shared resources. This works great on
more expensive hardware that has a management interface like
IPMI, but my 'toys' budget is a little more
limited.
It's equally possible to just cut the node off at it's power
source. Does anyone know of a (cheap) power strip with a
serial[1]/usb[1]/network interface where I can send signals to
cut off individual ports power?
If I can't switch off individual power ports, I will need to buy
two and have the nodes each manage the opposite node's
power.
[1] If it's serial or USB I'll need to use a third node as a
proxy to the device, which is annoying, but quite possible.
Hmm, dunno if anyone else spotted this interesting tidbit... the
new MySQL Certification study guide, the one on MySQL Cluster, is
made available via Lulu: http://www.lulu.com/content/1297960
MySQL AB used to have a deal with Pearson, branded as MySQL
Press.
Lulu.com on the other hand is a self-publishing system.
I've seen other Lulu books, the printing and binding is quite
excellent. No worries there.
But what this means is that apparently the Pearson deal ended
somehow and MySQL AB hasn't got another publisher. I find that a
bit curious. The problem is of course that now you're not likely
to see this study guide appear in any shops. Online is fine, but
shop-based distribution doesn't hurt, particularly with the
"competition" databases having plenty of related books on the
shelf. Diddums for Amazon & co, it's now just not there. So
people …
Inside of libmemcachd (aka the library behind the memcache engine for MySQL) I have a big stack of
hash algorithms you can pick to use. libmemcached
splits hashing into two concepts.
Hash used for key distribution
Algorithm used for distribution
For the hashing there is a default method that I use. It is
pretty generic in nature. There are two other primary methods are
MD5 and Hsieh.
So what does the performance look like for each of these?
Default: Testing generate_data 14.183 Testing get_read 11.144 Testing mget_read 1.992 Testing mget_read_result …[Read more]
At MySQL I'm writing several different command-line applications from the MEMo Agent to the MySQL Proxy. They all have a common set of requirement:
- command-line options
- config-files (mapping cmd-line options to config-files)
- logfile handling (syslog, SIGHUP, ...)
- a mainloop (SIGINT, CtrlHandler, ...)
- daemonizing (daemonize, services, ...)
- plugin handling
In the proxy svn you see all this a the chassis of
the proxy.
At the side it has a MySQL-Server and a MySQL-Client (we usually call it the proxy). Currently this is implemented as libmysql-proxy which is then used by the proxy plugin to implement the proxy.
By splitting up the design into 3 different layers:
- chassis
- low-level protocol + protocol states
- proxy implementation as plugin
we can
- use the …