Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
fuxkcsdn
V2EX  ›  Linux

Debian 7 用 dotdeb.org 源安装 MySQL, MySQL CLI 里无法输入中文,粘贴包含中文的 SQL 命令,中文也会消失

  •  
  •   fuxkcsdn · Sep 30, 2016 · 2912 views
    This topic created in 3542 days ago, the information mentioned may be changed or developed.

    Debian 7 官方源里的 mysql 5.5 是没问题,后来因为需要更新到 5.6 更新完后在 MySQL CLI 里就无法输入中文了, HOME,END 键也不行了

    google 了下貌似是 lib-editline 的关系(之前 Debian 官方源版本用 lib-readline 是没问题的)

    mysql --version
    mysql  Ver 14.14 Distrib 5.6.32, for debian-linux-gnu (x86_64) using  EditLine wrapper
    

    除了编译安装外,有其他办法吗??

    3 replies    2016-10-01 15:56:41 +08:00
    TaMud
        1
    TaMud  
       Sep 30, 2016
    my.cnf 里指定 utf-8
    已建数据库改成 utf-8
    xiaq
        2
    xiaq  
       Sep 30, 2016 via iPad
    试试 rlwrap mysql ?
    RobberPhex
        3
    RobberPhex  
       Oct 1, 2016
    libedit.so 版本太低了,导致无法输入中文,更新下就好了。

    在我的情况下, libedit.so.2.0.47 无法输入中文。 libedit.so.2.0.53 就可以。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3062 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 07:37 · PVG 15:37 · LAX 00:37 · JFK 03:37
    ♥ Do have faith in what you're doing.