sphinx遇到错误



 

[root@localhost mysql]# /usr/lamp/mysql/bin/mysqladmin -u root -p shutdown
Enter password:
/usr/lamp/mysql/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysqld.sock' (2)'

查看'/tmp/mysqld.sock' 文件 是否存在  
编译安装mysql 指定的mysqld.sock目录
 

 

 

[root@localhost ~]# /usr/lamp/coreseek/bin/indexer -c /usr/lamp/coreseek/etc/csft.conf --all
Coreseek Fulltext 3.2 [ Sphinx 0.9.9-release (r2117)]
Copyright (c) 2007-2011,
Beijing Choice Software Technologies Inc (http://www.coreseek.com)

 using config file '/usr/lamp/coreseek/etc/csft.conf'...
indexing index 'main'...
ERROR: index 'main': sql_query_pre[1]: Query cache is disabled; restart the server with query_cache_type=1 to enable it (DSN=mysql://root:***@localhost:3306/sphinx).

在sphinx配置文件开启缓存

query_cache_type=1


1
要开启mysql的缓存,在mysql配置文件
/etc/my.cnf;Debian和Ubuntu是在/etc/mysql/my.cnf)


双击代码全选

1
2
3

query_cache_size = 268435456
query_cache_type = 1
query_cache_limit = 1048576

 以上语句的设置中 query_cache_size 是分配256M内存给Query Cache;query_cache_type=1,是给所有的查询做Cache;query_cache_limit 是指定个别的查询语句1KB的内存。

  这些数据可以根据自己的需求作出适当的更改,设置完成之后,保存文档,重新启动MySQL即可。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

mumu_wangwei

主修"红尘道--红尘练心"

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值