Ton*_*ony 2 mysql thinking-sphinx
我的套接字文件位于:
/var/run/mysqld/mysqld.sock
Run Code Online (Sandbox Code Playgroud)
当我做:
rake thinking_sphinx:start
Run Code Online (Sandbox Code Playgroud)
我明白了:
rake aborted!
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Run Code Online (Sandbox Code Playgroud)
我想告诉think_sphinx我的套接字文件在哪里.这怎么可能?在Slicehost上执行我的切片硬重启后出现此问题.
编辑(希望)更清楚:
您可以指定要在sphinx搜索的配置文件中使用的mysql套接字sphinx.conf,通过sql_sock:
sql_sock = /var/run/mysqld/mysqld.sock
Run Code Online (Sandbox Code Playgroud)
(请注意,这取决于sql_host设置是否实际使用此值)
你也可以使用thinking_sphinx'配置文件RAILS_ROOT/config/sphinx.yml来设置(覆盖)这些值:
sql_sock: /var/run/mysqld/mysqld.sock
Run Code Online (Sandbox Code Playgroud)