如题。导入数据时,总是不断的显示
query ok, 100 rows affected, 274 warnings (0.02 sec)
records:100 duplicates:0 warnings:274...
好象是insert的错误,但不知道这个错误是什么原因。

解决方案 »

  1.   

    ..Query OK, 100 rows affected, 94 warnings (0.00 sec)
    Records: 100  Duplicates: 0  Warnings: 94Query OK, 100 rows affected, 90 warnings (0.00 sec)
    Records: 100  Duplicates: 0  Warnings: 90Query OK, 69 rows affected, 66 warnings (0.00 sec)
    Records: 69  Duplicates: 0  Warnings: 66Query OK, 3 rows affected (0.49 sec)
    Records: 3  Duplicates: 0  Warnings: 0Query OK, 12 rows affected, 3 warnings (0.11 sec)
    Records: 12  Duplicates: 0  Warnings: 3Query OK, 100 rows affected, 229 warnings (0.19 sec)
    Records: 100  Duplicates: 0  Warnings: 229Query OK, 100 rows affected, 231 warnings (0.10 sec)
    Records: 100  Duplicates: 0  Warnings: 231
      

  2.   

    楼主不愿意执行一下
    show warnings;
      

  3.   

    汗。。 看2楼的表情,我以为没有这个语句呢,以为你是骗我的。。这个sql文件有500M,我重新source导入一下吧,才会重现错误。
      

  4.   

    顺便请问下 。 mysql导入sql大文件时,可能要很长时间,这过程中  可以暂停吗?然后再继续
      

  5.   

    你可以手工编辑一下 sql文件。 保留几条测试用就行了。
      

  6.   

    直接导入错误太多。。   
    如果将sql文件  分段复制 粘贴执行 倒是正常。。
    Query OK, 0 rows affected, 1 warning (0.00 sec)Query OK, 0 rows affected, 1 warning (0.00 sec)Query OK, 0 rows affected (0.00 sec)ERROR 1231 (42000): Variable 'time_zone' can't be set to the value of 'NULL'
    ERROR 1231 (42000): Variable 'sql_mode' can't be set to the value of 'NULL'
    ERROR 1231 (42000): Variable 'foreign_key_checks' can't be set to the value of 'NULL'
    ERROR 1231 (42000): Variable 'unique_checks' can't be set to the value of 'NULL'
    ERROR 1231 (42000): Variable 'character_set_client' can't be set to the value of 'NULL'
    Query OK, 0 rows affected (0.00 sec)ERROR 1231 (42000): Variable 'collation_connection' can't be set to the value of 'NULL'
    ERROR 1231 (42000): Variable 'sql_notes' can't be set to the value of 'NULL'
    mysql> show warnings;
    +-------+------+----------------------------------------------------------+
    | Level | Code | Message                                                  |
    +-------+------+----------------------------------------------------------+
    | Error | 1231 | Variable 'sql_notes' can't be set to the value of 'NULL' |
    +-------+------+----------------------------------------------------------+
    1 row in set (0.15 sec)
      

  7.   

    这个不算错误吧,只是warning。
      

  8.   


    Query OK, 21 rows affected, 3 warnings (0.10 sec)
    Records: 21  Duplicates: 0  Warnings: 3mysql> show warnings;
    +---------+------+---------------------------------------------------------------------------------------+
    | Level   | Code | Message                                                                               |
    +---------+------+---------------------------------------------------------------------------------------+
    | Warning | 1366 | Incorrect string value: '\xAA\xE5\xBD\x95\xE7\x89...' for column 'type_name' at row 1 |
    | Warning | 1366 | Incorrect string value: '\xAE\xAF' for column 'type_name' at row 8                    |
    | Warning | 1366 | Incorrect string value: '\xA7\x86\xE5\x89\xA7' for column 'type_name' at row 13       |
    +---------+------+---------------------------------------------------------------------------------------+
    3 rows in set (0.00 sec)哦。也许是吧,谢谢。我再去找资料看看。