zoukankan      html  css  js  c++  java
  • 解决‘ERROR 1406 (22001): Data too long for column ‘name‘ at row 1‘

    出现这种问题,表面上是字段值输入有误的问题,其实是编码问题
    解决方法:

    在my.ini里找到(此文件在mysql安装目录下)
    sql-mode=”STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION”
    把其中的STRICT_TRANS_TABLES,去掉,
    或者把sql-mode=STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

    注释掉,然后重启mysql就ok了

    补充:
    mysql5.5 用到password()加密函数时,会报错,可能是因为没有这个函数吧
    可以使用MD5() 函数进行加密

  • 相关阅读:
    Unique path
    *Jump Game
    Valid Palindrome
    *Reverse Words in a String
    Min Stack
    [?]*Simplify Path
    *Valid Parentheses
    *Sqrt(x)
    String to Integer (atoi)
    Add Digits
  • 原文地址:https://www.cnblogs.com/nmydt/p/13789404.html
Copyright © 2011-2022 走看看