gpt4 book ai didi

MySQL 错误 #2014 - 命令不同步;你现在不能运行这个命令

转载 作者:IT王子 更新时间:2023-10-29 00:31:59 29 4
gpt4 key购买 nike

我正在使用 MySQL,我正在定义一个这样的存储过程:

delimiter ;;
Create procedure sp_test()

select * from name_table;
end

当我尝试执行该程序时,我收到此错误:

#2014 - Commands out of sync; you can't run this command now 

这是什么意思,我做错了什么?

最佳答案

来自引用手册部分 B.3.2.12 Commands out of sync :

B.3.2.12 Commands out of sync

If you get Commands out of sync; you can't run this command now in your client code, you are calling clientfunctions in the wrong order.

This can happen, for example, if you are using mysql_use_result() andtry to execute a new query before you have called mysql_free_result().It can also happen if you try to execute two queries that return datawithout calling mysql_use_result() or mysql_store_result() in between.

这个 post from the MySQL forums有这样的话:

I've solved that problem. I use MySQL-Fron instead MySQL Querybrowser. And everything works fine.

让我认为这不是服务器或数据库的问题,而是您使用的工具的问题。

关于MySQL 错误 #2014 - 命令不同步;你现在不能运行这个命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8891179/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com