Posted by: Paul on: September 16, 2009
1. Produce terminal-friendly output
Occasionally you may be using the command line and find yourself limited by the size of either the table you’re getting results from or by the size of the terminal window you’re using. (I find the DPS window particularly resistant to resizing.
You can get results in this format
column1_name: data
column2_name: data
instead of the [...]
Posted by: Paul on: August 4, 2008
Seeing as this is a bit of a pain to find, the correct syntax for exporting data and tables from a database is:
mysqldump -u username -p [database name] [table name] > [filename]
mysqldump will then ask you for your password and will then create the output file for you in the location your specify.
Note that mysqldump [...]
Posted by: Paul on: July 11, 2008
I’ve started building Serf – a personal project which I hope people will find useful. I’ve had plenty of ideas over the years but the idea behind Serf is something I find fascinating and feel compelled to pursue.
I’m going to keep it under wraps until it’s released (probably mid-October, if not sooner) but I can [...]
Posted by: Paul on: March 17, 2008
We’re planning on upgrading from an archaic mysql engine (3.58) to the latest, shiny release version (5.1), so I’ve undertaking a code review of some of our administration applications to see what this unearthed.
Turns out the password hashing for the MySQL native PASSWORD() function changed in version 4.1, so our login system won’t work [...]
Posted by: Paul on: February 28, 2008
MySQL’s REGEXP function is handy when you need to search for specific text strings within a textual column, but over large record sets, it’s performance can be less than fantastic.
Recently I had a situation at work where I needed to do a first name / last name search across a single name field. Due to [...]
Posted by: Paul on: March 6, 2007
MySQL server says: “There’s something wrong with your query. I cannot magically turn your crap, buggy, invalid SQL into good code”
Like the previous post, the error message won’t be shown in phpMyAdmin when using older versions of MySQL, just the error number.
Posted by: Paul on: March 6, 2007
MySQL server says: “I can’t get JOIN data from a table that DOESN’T EXIST. Do you hear me? YOUR TABLE NO EXISTO GENIUS!”
It’s hard to get data from a table that doesn’t exist – trust me on this one.
Either this, or you need to recreate your table and set the table type to MyISAM (which [...]
recent comments