Novice to Ninja Chapter 2: Syntax problems with phpmyadmin

Was able to complete all exercises until I tried typing the command “DESCRIBE joke” (without quotes) which gives me ERROR #164 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘index’ at line 1. Also tried “DESCRIBE joke;”. Had same problem with SELECT command. Using OSX 10.8.5, set up server with MAMP as outlined in book. Also, when I access the home page for phpmyadmin there’s a notice that I don’t have the latest version (4.0.8) which I’ve downloaded but I don’t know what to do with it.

So you entered the sql command ‘DESCRIBE joke’ in phpMyAdmin, and the message says you have an error near ‘index’ at line 1 ? That’s weird, because there is no ‘index’ in ‘DESCRIBE joke’ …

Sorry…i named my table index and used it in the commands

Sigh, first off, that was a mistake as index is a keyword. But to get around this blunder use the following (using back ticks so MySQL knows you are not inferring the keyword):

DESCRIBE `index`

Thank you! I renamed the table and was able to execute the commands. Any advice for upgrading phpmyadmin to 4.0.8?


pro tip to OP and all others who might read this thread: please do not use fake names

it wastes your time and annoys the pig (that’s an old punch line, not an insult)

Are you using XAMPP, WAMP, MAMP? Any of those, none of those?


try heidisql instead


Are you using XAMPP, WAMP, MAMP? Any of those, none of those?


Okay, start with this:

If you get stuck, let us know, but it looks to be straight forward.

okay, sorry, no heidisql for you

thanks anyway!

Thank you! The main instructions were a bit confusing since I didn’t install MAMP PRO but the method given by Charles Butcher (see below) in the comments worked fine.

"The following worked for me with 10.8.5, MAMP 2.2 and phpMyAdmin 4.0.8:

  1. Rename /Applications/MAMP/bin/phpMyAdmin to “phpMyAdmin_old”.

  2. Move the newly-downloaded phpMyAdmin folder into /Applications/MAMP/bin/ and rename it “phpMyAdmin”.

  3. Copy /Applications/MAMP/bin/phpMyAdmin_old/ to /Applications/MAMP/bin/phpMyAdmin/

Might be different if you are running MAMP Pro."