作者:佚名 时间:2023-09-04 09:33:41 阅读:(23)
在服务器部署coreseek,都编译完成了在生成索引的时候却提示:sql_connect: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock',接下来云梦编程为大家介绍一下解决方法,有需要的小伙伴可以参考一下:
ERROR: index 'lkeyw': sql_connect: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) (DSN=mysql://root:***@localhost:3306/new_itbiancheng).
(1)、方法一(亲测可用):
修改csft.conf配置文件,在source配置增加sock的指定
sql_sock = /tmp/mysql.sock
(2)、方法二:
修改mysql的配置文件my.conf,将sock的配置改成错误提示中的路径
[client] #password = your_password port = 3306 socket = /var/lib/mysql/mysql.sock [mysqld] port = 3306 socket = /var/lib/mysql/mysql.sock datadir = /usr/local/mysql/var
如果不想修改my.cf文件也是可以的,我们可以根据提示的路径做一个软链文件
ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
(1)、centos安装coreseek
(2)、Linux安装Coreseek提示“/src/sphinx.cpp:22292: undefined reference to”错误的解决办法
(4)、sphinx.cpp:22292:对‘libiconv_open’未定义的引用
(5)、sphinxexpr.cpp:1746:43: error:‘ExprEval’ was not declared in this scope
以上就是云梦编程为大家介绍的关于Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'的解决方法,了解更多相关文章请关注云梦编程网!