Amazon My database password contains bang character (!) and when I specify the password in sphinx config I keep getting errors. Why?
SOLUTION
It goes without saying that it must have something to do with escaping special characters! How nasty is that? And the Sphinx user manual does not really mention how to deal with special characters. Anyway the solution is that you simply use backslash (\) to escape special characters. Suppose my host is localhost and user name is root and password is crack!t, then here's a typical 'source' block in sphinx configuration:
11 | select store_id+1000,store_id as id, 'store' as type,title,title as data,body from store union \ |
12 | select brand_id+2000,brand_id as id, 'brand' as type,title,title as data,body from brand union \ |
13 | select style_id+3000,style_id as id, 'keyword' as type,title,title as data,body from keyword |
17 | sql_attr_string = type |
18 | sql_field_string = title |
19 | sql_field_string = data |
Note how I escape the exclamation mark in sql_pass with a backslash (\) haha!
If you have any questions let me know and I will do my best to help you!