Hi,
I am trying to connect Flying Sphinx with my Amazon RDS instance
using SSL in Heroku. The dyno is connected properly, since I have
been able to load the database schema without issues. The
DATABASE_URL looks something like (I have replace the values just
in case):
mysql2://<user>:<password>@<amazon_rds_host>/<database>?sslca=config/amazon-rds-ca-cert.pem
The problem comes when I try to build the indexes (rake
fs:index):
indexing index 'custom_field_value_core'...
ERROR: index 'custom_field_value_core': sql_connect: Access denied for user '<user>'@'<amazon_rds_host>' (using password: YES) (DSN=mysql://<user>:***@<amazon_rds_host>:3306/<database>).
total 0 docs, 0 bytes
total 0.358 sec, 0 bytes/sec, 0.00 docs/sec
Again, I have replaced the values. That kind of error is printed several times. I am not using any configuration file for Sphinx. I have tried the same disabling SSL and eveything worked just fine. Even though, I would like to enable SSL again. Any idea about why the SSL is not working?
Thanks in advance!
#1 Posted by Pat Allan Support staff on 06 Dec, 2014 11:36 PM
Hi Jose
Sphinx has a few options for MySQL SSL settings:
http://sphinxsearch.com/docs/current.html#conf-mysql-ssl
If you set these in
config/thinking_sphinx.ymlfor the correct environment (each refer to a file), and then deploy that change with the appropriate files, the next time you runrebuildorconfigure, those settings will be pushed up to the Flying Sphinx servers, and indexing should work.Cheers
Pat
#2 Posted by Pat Allan Support staff on 06 Dec, 2014 11:37 PM
Also: I'm not sure if all three are needed - may depend on your/RDS's setup.
#3 Posted by Jose on 08 Dec, 2014 10:27 PM
Hi, Pat,
It worked like a charm. Thanks for your help!
Best,
Jose
#4 Posted by Pat Allan Support staff on 09 Dec, 2014 02:49 AM
Great to hear :)
Pat Allan closed this discussion on 09 Dec, 2014 02:49 AM.