Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT

Posted 赣州博讯科技工作室

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT相关的知识,希望对你有一定的参考价值。

Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT

MySQL版本不同导入数据时报错

Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT
https://blog.csdn.net/weixin_43883917/article/details/112065447

执行sql报错:Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP……
https://blog.csdn.net/xisheng_lx/article/details/122458441

Incorrect key file for table '/tmp/#sql_882_0.MYI'; try to repair it

修表方法如下:

一法:. check table 和 repair table 方法
1,进入Mysql 的Dos控制台,输入密码进入

2,use database;(你的数据库名)

3, check table tabTest; 
如果出现的结果说Status是OK,则不用修复,如果有Error,可以用: 

> repair table tabTest;

 

 

另外一个很可能的原因是临时文件夹空间不足,在进行大数据JOIN,ORDER BY时可能出现,这时需要修改临时文件夹路径

在启动命令中增加tmpdir参数:

/usr/bin/mysqld_safe --defaults-file=/etc/my.cnf --pid-file="$mypidfile" --log-error="$errlogfile" --tmpdir=/var/tmp

以上是关于Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT的主要内容,如果未能解决你的问题,请参考以下文章

Incorrect key file for table './xx_db/xx_table.MYI'; try to repair it

Incorrect key file for table ' '; try to repair it

1075 - Incorrect table definition there can be only one auto

Incorrect key file for table '/tmp/#sql_882_0.MYI'; try to repair it

记录:MySQL报错1075 - Incorrect table defintion;there can be only...解决方案

Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT