Practicalweb Ltd

Technical information on this site may be out of date : no updates since 2015

Ubuntu Mysql Root password reset (init file not found)

October 9, 2015 , posted under mysql

If you don’t use the mysql root account very often and change passwords reasonably frequently you may (like me) find that you no longer know the mysql root password on a dev box.

The mysql site has a reasonable guide here

But there always seems to be something additional, this time for me it was apparmor preventing mysql from reading my reset file

Read More…


March 24, 2010 , posted under mysql bug

I just found out the painful way that if you manually update a column which is normally calculated automatically as an auto_increment it seems to work at first ..

but MySQL doesn’t update the auto_increment value for the table - so subsequent inserts can fail.

Read More…

SQL Greatest and Least

July 21, 2009 , posted under postgresql mysql sql

Most of the time I can get what I want out of SQL using the standard aggregate functions, but today I needed to find the latest timestamp from any one of three columns.

I achieved this using the GREATEST() function, it’s not part of the SQL standard but is commonly available.

Read More…

Updating Drupal

December 15, 2008 , posted under drupal mysql sql

For most of 2008 I’ve been working on a large Drupal installation (around 10 developers,  something like 100 custom modules, 17 languages, split over 2 sites).

This all adds up to a lot of updates, and schema changes.

Read More…

Adding comments to the database

July 31, 2008 , posted under documentation mysql sql

Comments in code are widely used and generally (but not universally) accepted as a good thing.

Databases can also accommodate comments - but these seem to be very rarely used.

I’m of the opinion that database comments are very useful.

Read More…