对第一个问题,
我看到这个解x法,之后便感觉应该是q几个系l变量没有设|好的原因?/p>
用echo 查看了一下这三个变量Q果?GTK_IM_MODULE ?QT_IM_MODULE 的值是 xim ?/p>
我用了以下方法:
aQ安?ibus-gtk ibus-gtk3 ibus-qt4 在三个包
bQim-switch -s ibus
之后注销QOKQ问题解冟?/p>
对第二个问题Q?/p>
在网上找了一个这LҎ Q原帖地址找不CQ:
?/usr/share/ibus/ui/gtk/panel.py d两行代码Q如下蓝色标记出来的Q行首的“Q?#8221;不算Q:Linux下的MySql的安装与配置的ȝ
1Q?span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> ?/span>http://www.mysql.com/上下载适合自己操作pȝ的,~译好的MySql包?/span>
2Q?span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> 解压C自己惌的目录?/span>
3Q?span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> 查看?my.cnf?/span>文g里默认的配置路径是什么。然后?/span>
find . | xargs grep "$默认路径" 扑և所有的需要改的地?/span> Qƈ使用
?%s/aaa\/a/bbb\/b/g ?/span>其全部改ؓ自己的\径(包括.my.cnf里面的)?/span>
4Q?span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> 使用netstat –atln | grep ?/span>端口?/span>?/span>查看你自q端口是否被占用,找一个空闲的端口Q?/span>
q修攚w|文仉面的端口己选定的空闲端口?/span>
5Q?span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> 支持中文Q在[client] [mysqld] [safe_mysqld]三项配置下面加上default-character-set=utf8
6Q?span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> 启动Q?/span> ./mysqld_safe --defaults-file=.my.cnf default-character-set=utf8 & Q推荐?/span>safe模式启动Q?/span>
--defaults-file=.my.cnf Q用于指定用于启动的配置文g。如果不指定的话Q?/span>mysql会自动在以下三个
地方q行查找Q?/span>
全局Q把q个my.cnf文g复制到服务器?/span>/etc目录Q此时文件中所定义的参数将全局有效Q即?/span>
该服务器上运行的所?/span>MySQL数据库服务器都有效?/span>
局部:把这?/span>my.cnf文g复制?/span>[MYSQL-INSTALL-DIR]/var/该文件只Ҏ定的服务器有效,
其中[MYSQL-INSTALL-DIR]表示安装MySQL的目录?/span>
用户Q最后,我们q可以把该文件的作用范围局限到指定的用Pq只需?/span>my.cnf文g复制?/span>
用户的根目录卛_?/span>
default-character-set=utf8 Q用于指定数据库使用的编码,如果?/span>.my.cnf中已指定则此可以省?/span>
7Q?span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> 关闭Q?/span>./mysqladmin -p -uroot -h localhost -P 3306 shutdown
8Q?span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
打开q程q接Q?/span>mysql默认是关闭远E连接的Q要打开q程q接则需要以root用户dQ然后把
mysql库里?/span>User表中指定用户名的host更新?/span>??/span>卛_
use mysql;
update User set host = '%' where user = '用户?/span>';
9Q?span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> Javaq接Q?/span>jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding= utf8.
?/span>jdbcq接串后面加上相应参?/span>useUnicode=true&characterEncoding= utf8.卛_