yingying's profileyingPhotosBlogLists Tools Help

Blog


    June 18

    引用一个朋友的贴子

    MYSQL5备忘
    费尽一番波折才把MYSQL5装好,并且跑起来了,中间碰到一些问题,在这里做个备忘。
     
    1,安装时有不少配置,一般按默认即可。留心看看那些英文,在字符集那里要特别小心,要选择是GB2312或GBK或UTF8。
     
    2,安装好后成功启动了MYSQL服务,使用PHPMYADMIN时,多半会看到如下提示:Client does not support authentication protocol requested by server; consider upgrading MySQL client
     
    请先确定你的mysql client 是4.1或者更高版本.(WINDOWS下有问题你就直接跳到下面看解决方法了,因为MYSQL 在WINDOWS是client和server一起装上了的)
    请使用以下两种方法之一
    其一:
    mysql> SET PASSWORD FOR
      -> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');
    其二:
    mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')
      -> WHERE Host = 'some_host' AND User = 'some_user';
    mysql> FLUSH PRIVILEGES;
    上面红色的部分请按自己实际情况修改....
    这样做后,连接就会正常了。
     
    3,升级后,有些以前的写法用不了,如:INSERT INTO `news` (`ID`, `Title`, `Content`) VALUES ('', '标题', '正文');
    时出现错误:
    #1264 - Out of range value adjusted for column 'ID' at row 1
     
    原因:
    新版本的MySQL对字段的严格检查。
    解决方法:
    修改my.ini,将
    sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
    改为
    sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"。
    重新启动MySQL。

    以后写sql语句时,类型和值最好严格一些。
     
    第3点来自互联网,呵呵。

    Comments (1)

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    (突破一网一絡一封一鎖一软-件)下載:
    https://sites.google.com/site/freegatebbs
    (免费代-理-服-务-器)(可上浏览維-基-百-科、BBC、youtube等)
    June 12

    Trackbacks

    The trackback URL for this entry is:
    http://jaly1670.spaces.live.com/blog/cns!7806569CB24DF8!194.trak
    Weblogs that reference this entry
    • None