Archive for the ‘MySQL’ Category

At Everlution we did a hack day to help motivate developers and to get the team working together. We started at 8.30am and finished at 5pm. It was pretty impressive what all the teams managed to achieve, with four teams of two developers and a designer. It was set out in a competition style event […]

Vagrant is simply a wrapper around Virtualbox headless that allows for provisioning virtual machines with support for puppet, chef-solo, chef, and bash. This allows you to automate the deployment and sandboxing of development sites. Additional base box images can be found at vagrantbox.es. Installing Vagrant apt-get install -y ruby1.9.1 ruby1.9.1-dev ln -svf /usr/bin/ruby1.9.1 /etc/alternatives/ruby gem […]

This is something I commonly have to run and always seem to forget. In order to run unattended. Java 6 installation on Ubuntu add-apt-repository “deb http://archive.canonical.com/ $(lsb_release -s -c) partner” apt-get update echo “sun-java6-jdk shared/accepted-sun-dlj-v1-1 select true” | debconf-set-selections echo “sun-java6-jre shared/accepted-sun-dlj-v1-1 select true” | debconf-set-selections DEBIAN_FRONTEND=noninteractive aptitude install -y -f sun-java6-jre sun-java6-bin sun-java6-jdk Java […]

Currently I have been trying to migrate a 4 node production MySQL database to a blade G5/G7 with vmware ubuntu instances on top of netapp. Typically I would not use a virtual machine nor try to run MySQL on top of NFS, however this needs to fit within the clients infrastructure. Baseline Base line performance […]

I wrote a couple rather large stored procedure some time ago to generate a couple reports. A bash script truncates a temporary file and executes the stored procedure writing to a temporary location, the bash script adds the headers to the final location of the csv file and concatenates the contents of the csv written […]

One of our clients Gorkana was bought by Durrants. As such I have been working on integrating and merging data. As a result I wrote a script to synchronize data between MySQL and Oracle, which is presently a one way synchronization. The implementation The script(s) to synchronize data was broken into a few scripts. Automatically […]

Recently I started migrating an old server, which had skip-networking within my.cnf, which is not a dynamic option and requires you to restart the mysql server. I typically rsync the source code and static data to a new machine. Configure the webserver with the relevant vhosts and change the database connection details to point to […]

MySQL: LAST_INSERT_ID()

In: MySQL

26 May 2010

If you use LAST_INSERT_ID() and insert on the primary key value it will only return the last “insert id” which has not included the primary key DROP TABLE IF EXISTS `example`; CREATE TABLE IF NOT EXISTS `example` ( id INT(11) NOT NULL AUTO_INCREMENT, b CHAR(3), PRIMARY KEY(id)) ENGINE=InnoDB; INSERT INTO example SET id=1; INSERT INTO […]

The Project I was recently working on a project to expose our trading systems via XmlRpc, Rest and SOAP. It was quite an interesting project, which took two of us three weeks to develop (Amongst other things). This involved creating a testbed, that would automatically generate the payload and response for each protocol. The parameters […]

In high performance web applications you will always have bottlenecks within your application. Identifying these bottlenecks and optimizing is a tedious task and typically show themselves underload. A single bad/unindexed query can bring a server to its knees. A large number of rows will also help to highlight any poor queries, and on very large […]


About this blog

I have been a developer for roughly 10 years and have worked with an extensive range of technologies. Whilst working for relatively small companies, I have worked with all aspects of the development life cycle, which has given me a broad and in-depth experience.