I managed to reproduce this error with MySQL and phpmyadmin:
#2014 - Commands out of sync; you can't run this command now
In this version of MySQL:
el@apollo:~$ mysql --version mysql Ver 14.14 Distrib 5.5.34, for debian-linux-gnu (x86_64) using readline 6.2
Use the following SQL to run the phpmyadmin query window:
use my_database; DELIMITER $$ CREATE PROCEDURE foo() BEGIN select 'derp' as 'msg'; END $$ CALL foo()$$ <----Error happens here, with or without delimiters.
I could not get the error through the MySQL terminal, so I believe this is a phpmyadmin error.
It works fine on the terminal:
mysql> delimiter $$ mysql> use my_database$$ create procedure foo() begin select 'derp' as 'msg'; end $$ call foo() $$ Database changed Query OK, 0 rows affected (0.00 sec) +------+ | msg | +------+ | derp | +------+ 1 row in set (0.00 sec) Query OK, 0 rows affected (0.00 sec)
I think the error is due to changing the intermediate delimiter request in phpmyadmin.
Workaround: Slow down, cowboy, and run your SQL statements one at a time using phpmyadmin. phpmyadmin is a "single bean", it can only do one job.
Eric Leschinski
source share