Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/facebook/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
更新innodb自动增量的MySQL初始化文件_Mysql_Innodb_Auto Increment - Fatal编程技术网

更新innodb自动增量的MySQL初始化文件

更新innodb自动增量的MySQL初始化文件,mysql,innodb,auto-increment,Mysql,Innodb,Auto Increment,我试图在每次mysql服务重新启动时执行一个小语句。我在my.ini(init file选项)中声明的文件中有以下代码: 日志上写着: 2016-02-13T23:19:14.135305Z 1 [ERROR] 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use

我试图在每次mysql服务重新启动时执行一个小语句。我在my.ini(init file选项)中声明的文件中有以下代码:

日志上写着:

2016-02-13T23:19:14.135305Z 1 [ERROR] 1064
    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 'SELECT GREATEST( IFNULL((SELECT MAX(ID) FROM skydb.w_messaging_type_b_files_proc' at line 1
正如您可能猜到的,我的数据库使用innodb存储引擎,我希望避免在表处理队列上进行自动增量重置


知道我做错了什么吗?

这里只能使用“常量”。您希望通过
ALTER
实现什么?嗨,瑞克。我正在尝试更新表w_消息传递类型b_文件处理队列的自动增量值。我不知道“w_消息传递类型b_文件处理队列”是什么意思。如果需要跨多个表的单个自动inc,请不要这样做;而是使用一个表来提供auto inc值。Rick w_messaging_type_b_files_processing_queue是该表的名称。
2016-02-13T23:19:14.135305Z 1 [ERROR] 1064
    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 'SELECT GREATEST( IFNULL((SELECT MAX(ID) FROM skydb.w_messaging_type_b_files_proc' at line 1