Showing entries 1 to 10 of 18
8 Older Entries »
Displaying posts with tag: hacking (reset)
Better MySQL Security and Administration


Download PDF Presentation

With the recent cyber attacks and breaches with data from large organizations including Sony, is your MySQL data safe? What are the best practices for securing and administering your MySQL environment? In this presentation we will cover the essential steps for better MySQL security. We will also cover the different installation and administration tasks necessary to ensure your data is managed.

Presenter: Ronald Bradford
Schedule: Insight Out DB Showcase. October 2011 …

[Read more]
Multi-tenancy Drizzle

My previous post focused on some of the problems of doing multi-tenant MySQL.

One of the reasons why I started hacking on Drizzle was that the multi-tenancy options for MySQL just weren’t very good (this is also the reason why I run my blog in a VM and not a shared hosting solution).

What you really want is to be able to give your users access to a virtual database server. What you don’t want is to be administering a separate database server for each of your users. What you want are CATALOGs.

A CATALOG is a collection of SCHEMAs (which have TABLEs in them). Each CATALOG is isolated from all the others. Once you connect to a catalog, that’s it. They are entirely separate units. There are no cross-catalog queries or CHANGE CATALOG commands. It is as if each catalog is its own database server.

[Read more]
BlitzDB Crash Safety and Auto Recovery

Crash Safety is a big deal in the database league. Lack of durability can lead to all sorts of terrible things upon a catastrophic event. Many projects, especially in the so called NoSQL world compromises crash safety in return for higher QPS. The argument there is that the availability of the overall system should be accomplished by replication since a database server can’t be rescued if the physical disk breaks. I happen to agree with this philosophy but I am also aware that this isn’t a correct answer for everyone. So, what will I do with BlitzDB?

Several relational database hackers have pointed out that BlitzDB isn’t any safer than MyISAM since it doesn’t guarantee crash safety. This is currently true but I plan on making BlitzDB much safer than MyISAM by providing following features.

  1. Auto Recovery Routine (startup option)
  2. Tokyo Cabinet’s Transaction API (table-specific option)

The …

[Read more]
MySQL client tool and how to output newlines

This blog posts explains how to add a new line in strings in MySQL Stored Procedures and how to output the result using the MySQL client tool.

Today I was fooling around with some stored procedure making it more fancy and stuff. What I wanted was the OUT variable to contain a newline. Easy of course, using CONCAT:

mysql> SELECT CONCAT('foo','\n','bar');
+--------------------------+
| CONCAT('foo','\n','bar') |
+--------------------------+
| foo
bar                  |
+--------------------------+

Now, if youconcat strings in a stored procedure, it …

[Read more]
Simulating server-side cursors with MySQL Connector/Python

Last week, my colleague Massimo and I discussed how to handle big result sets coming from MySQL in Python. The problem is that MySQL doesn't support server-side cursors, so you need to select everything and then read it. You can do it either buffered or not. MySQL Connector/Python defaults to non-buffered, meaning that you need to fetch all rows after issuing a SELECT statement. You can also turn on the buffering, mimicking what MySQL for Python (MySQLdb) does.

For big result sets, it's better to limit your search. You can do this using an integer primary key or some temporal field for example. Or you can use the LIMIT keyword. The latter solution is what is used in …

[Read more]
Freiwild almost ready for Django 1.0.2

I've been working on our Freiwild Shop website today making it compatible with Django 1.0.2 (final(ly)!). Basically, what I've done is try to run it and fix where it errors following the direction documented in the manual. I think that the next days I'll see how I can optimize the MySQL usage a bit.

The shop I've build has little models and doesn't use to much fancy tricks. Among the changes:

  • Templates: extends should be on the first line
  • Models: should not contain anything Admin-related. This is actually very nice, seperating models.py and admin.py.
  • Model Fields: maxlength changed to max_length, oldforms/newforms options disappeared, small stuff like this.
[Read more]
SugarCRM not committing transactions? (installation)

What does a MySQL Support Engineer do during his first hours of vacation? Yes, napping. After that, he goes on the web and tries out something new. Today: SugarCRM .. and struggeling a little with the installation.

The problem? The installation (on MacOS 10.5) was successful, no errors, but:
Sugar CRM 5.1.0c Files May Only Be Used With A Sugar CRM 5.1.0 Database

Logging didn't reveal anything, but the general query log did! All DML statements were send to MySQL, but apparently not .. committed? After looking in the code I noticed a lack of commit statements.. Putting an explicit commit it worked, for the `config` table.

What was the real problem?

[mysqld]
init_connect='SET AUTOCOMMIT=0'

Don't ask me why that was there, sometimes I do crazy stuff testing things, but this setup should …

[Read more]
Changing Lanes: Leaving Sun/MySQL

After having worked for two years and one quarter of a year with MySQL AB (now Sun), I have decided to resign and pursue another career.

Before I joined MySQL AB I was working as a database consultant and application developer. I knew that joining MySQL would mean giving that up, but I was happy to do so because I really liked the MySQL product. I was also attracted by the company itself, the flexible working hours, working from home, travelling abroad, and, very important, being one of the few companies that is capable creating FOSS software on a commercial basis.

I have had a splendid time at MySQL AB, and later Sun. I met lots of smart people and travelled to a bunch of places I would probably not've had the chance to visit otherwise. I learned a lot about the …

[Read more]
Building MySQL from Source: There's a fine line...


There's a fine line between love and hate, you see
Can't wait to late, but baby I'm on it


(From: "Liberation" by Outkast)

Suppose you need to build a MySQL server with the same options as a pre-built one, distributed through the MySQL download site.

Sounds strange?

Well, maybe, but that's what you need if you want to compile certain MySQL 5.1 plug-ins so that they'll will play nice with such a pre-built server.

Some plug-ins depend on nothing more but the plugin.h header file, but for example storage engine plug-ins require things way beyond that. If you want to compile those yourself, you are required to first build a …

[Read more]
My Sakila Cube


My Sakila Cube (black)
Originally uploaded by Geert JM VanderkelenThis is maybe an old idea, but still great to do! Thanks to Ronald's tip I could make the cube you see here. Just pure fun!

Check out how to do on Ned Batchelder's site!

(Also thanks to Ronald Bradford, I can walk the earth with my good walking shoes! )

Showing entries 1 to 10 of 18
8 Older Entries »