问题描述

    想从服务器上DOWN下数据库。操作:先把数据库转存为SQL文件,然后在本地利用navicate运行SQL文件,出现错误信息:

Incorrect table definition;there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

  解决思路

    参考:

http://www.cnblogs.com/joeylee/p/3877578.html

   原因:TIMESTAMP中,低版本中不支持一个表中有两个TIMESTAMP字段。

   解决方案:

      1、select version(); 查看服务器上用的哪个SQL版本。 同步到本地。

      2、卸载Mysql (原来已安装mysql 5.5 --->mysql 5.6)

          I.利用安装与卸载应用程序卸载mysql。(需要关机重启)

          II.cmd->services.msc  打开服务,看到MySQL服务名还在。

            cmd->sc delete MySQL(要删除的服务名)

      3、安装mysql

          I.下载mysql 5.6 -64x.zip,解压后放到对应位置**。  下载位置:http://pan.baidu.com/s/1kVvYtIf

          II.配置PATH环境变量

            **/bin 配置到PATH

           在**路径下找到my_default.ini或者新建一个my.ini

            输入或更改

            [mydqld]

            basedir = **

            datadir= **\data

      4、启动mysql

          I.cmd->cd **\bin ->mysqld --install

          II.成功后继续输入 net start mysql

      5、登录mysql

          I.cmd->cd **\bin->mysql -u root -p

          II.首次登录没有密码  直接登录成功

          III.修改root的密码

            use mysql;

            update user set password=password("new_pass") where user="root";

            flush privileges;

            exit;

      6、想要修改已经存在root密码

          I.my.ini中加入(如果没有,可以在my_default.ini中)

            [mysqld]

            #跳过密码验证

            #skip-name-resolve

          II.然后在cmd中直接输入mysql -uroot 就可以直接登录  执行上一步的第三项就可以了

      7、登录成功后,再次执行同步后就不出现问题了.

            

        

      

Mysql运行SQL文件 错误Incorrect table definition;there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause的更多相关文章

  1. Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

    错误描述 在DBeaver执行DDL语句时报错:SQL 错误 [1293] [HY000]: Incorrect table definition; there can be only one TIM ...

  2. 1293 - Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

    在数据库执行脚本文件时,执行到一半会遇到  这种问题: 出错处:2018-05-14 18:53:38 行号:712454 错误代码: 1293 - Incorrect table definitio ...

  3. msyql同步的时候报错 : 错误代码: 1293 Incorrect table definition;there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

    场景,两个不同服务器上的数据库,进行数据库同步 但是执行之后,提示报错 错误代码: 1293 Incorrect table definition; there can be only one TIM ...

  4. mysql单表多timestamp报错#1293 - Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

    一个表中出现多个timestamp并设置其中一个为current_timestamp的时候经常会遇到#1293 - Incorrect table definition; there can be o ...

  5. Mysql --- Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

    我使用的5.5的mysql数据库会报这个错, 换成5.7的就可以了

  6. MySQL there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause同时创建多个更新当前时间戳字段 解决方法

    问题重现 在写这篇文章之前,明确我的MySQL版本,MariaDB 或者你使用 MySQL 8 也会出现如下问题 MySQL 版本 现在有这样的需求,一张表中有一个字段created_at记录创建该条 ...

  7. Mysql [Err] 1293 there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

    问题: mysql数据 导入数据出错 [Err] 1293 - Incorrect table definition; there can be only one TIMESTAMP column w ...

  8. mysql5.7 timestamp错误:there can be only oneTIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE

    #1293 - Incorrect table definition; there can be only oneTIMESTAMP column with CURRENT_TIMESTAMP in ...

  9. mysql:[Err] 1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key

    删除主键时,出错:[Err] 1075 - Incorrect table definition; there can be only one auto column and it must be d ...

随机推荐

  1. POJ3694 Network(连通图+LCA)

    题目链接:http://poj.org/problem?id=3694 题目大意:给定一个图,每次添加一条边(可能有重边).输出每次添加后桥的 数目.由于添加边的次数比较多,添加一次Tarjin一次明 ...

  2. JavaWeb 学习009-4个页面,5条sql语句(添加、查看、修改、删除)

    ===========++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++==+++++++++ 2016-12-3------ ...

  3. 3.使用git提交项目到开源中国(gitosc)

    1.提交地址 使用的是开源中国git仓库 git.oschina.net 在windos环境下使用msysgit. 2.初始化化 username.email初始化 git config --glob ...

  4. 我总结的git命令指南。

    git命令行指南 1.windows上安装git的网址:http://msysgit.github.com/. 没有安装过git的 这个网址里下mymsgit. 因为发现有些同学对git还不是那么熟悉 ...

  5. 您还有心跳吗?超时机制分析(java)

    注:本人是原作者,首发于并发编程网(您还有心跳吗?超时机制分析),此文结合那里的留言作了一些修改. 问题描述 在C/S模式中,有时我们会长时间保持一个连接,以避免频繁地建立连接,但同时,一般会有一个超 ...

  6. Centos7 密码重置

    1.在grub启动页面,按e编辑启动选项 2.找到Linux 16的那一行,将ro改为rw init=/sysroot/bin/sh 3.按下 Control+x ,使用修改后的设置启动,出现命令行 ...

  7. iOS的后台任务

    翻译自:http://www.raywenderlich.com/29948/backgrounding-for-ios (代码部分若乱码,请移步原链接拷贝) 自ios4开始,用户点击home按钮时, ...

  8. Python赋值语句与深拷贝、浅拷贝的区别

    参考:http://stackoverflow.com/questions/17246693/what-exactly-is-the-difference-between-shallow-copy-d ...

  9. 读书笔记——body and html

    在看<常见标签的默认属性值及相互作用——关于CSS reset的思考>的时候,其中说body默认的margin是8px.但是,将body的backgound-color:red:后,看到的 ...

  10. VMware 搭建 虚拟机设置 静态IP地址配置

    第一步: 第二部:注意网关 第三步: 在配置CentOs安装的时候,记得勾选