Category Archives: MySQL

PHP and MySQL Development Tools for Mac

Over the years I have used all three platforms (Mac, Winblows, Linux) to do my development work, and have used a wide range of software tools. I’ve finally found a selection of tools that work really well for me, so I thought I would share them. These are all Mac based.

Coda 1.7
www.panic.com/coda/ – $99
Coda doesn’t have all the features of some other IDEs, but it has everything I need for PHP, HTML & CSS development. Completely customisable code colouring, syntax prompting, built in file management (local and remote with FTP or S/FTP), built in SVN support, and even a built in terminal. All very useful. Version 2 is long overdue, but no doubt it will be out sometime this year, and will add even more goodies like code folding. Overall, the interface is just superb, and best of all it doesn’t have Dreamweaver’s bloated price tag.

Sequel Pro 0.9.8.1
www.sequelpro.com – donationware
Sequel Pro is a brilliant piece of software for managing MySQL databases, and is much more user friendly than MySQL’s own Mac management tool. Supports tunnelling through SSH, and like all great software, it just works.

Transmit 4.1.5
www.panic.com/transmit/ – $34
The best FTP & S/FTP client for Mac. Nothing else comes close. Being able to mount remote locations as drives on my local machine is pure genius. The sync tool is extremely useful too.

Mac Terminal
Part of OS X and absolutely essential for remote server management. One of the main reasons I use a Mac is the inherent compatibility with Linux machines thanks to the UNIX core of OS X. Somehow, using PuTTY on a Winblows machine is just not the same. I regularly transfer massive websites, and the best way to do that is gzipped tarballs transmitted via scp on the command line. Quick and easy.

Versions 1.1.5
versionsapp.com – €39
Versions is an absolutely fabulous Subversion client for Mac. If you use SVN, you’ll want to take a look at Versions.

Mysql Error: #42000 The used command is not allowed with this MySQL version

Are you getting the above error message? Are you attempting to import data from a file into MySQL using LOAD DATA LOCAL INFILE?

The reason this message crops up is due to a security setting in the MySQL configuration file (my.cnf). The following tweak to the file will fix the problem, however, MAKE SURE that none of your code is vulnerable to SQL injection attacks before you do this, as making this change could potentially allow someone to access local files on your server if you have any vulnerabilities in your queries. If you are using PHP, a good start would be making sure that all user entered data (GET, POST etc.) is run through the mysql_real_escape_string() function prior to being sent to MySQL. You have been warned!

This method assumes you have root access to the server. If not, you’ll need to speak nicely to your server admin ;-)

Find your my.cnf file. The exact location will depend on your OS/distribution. On Linux boxes it might be in /etc or /etc/mysql or something similar.

You will probably have a line in your my.cnf that says: set-variable=local-infile=0

Change it to: set-variable=local-infile=1

Restart MySQL.

You should now be up and running. It goes without saying that I am not responsible for anything untoward that happens on your server as a result of following these instructions.