Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote rethinkdb connection #18

Open
ziasultan2 opened this issue May 11, 2020 · 2 comments
Open

Remote rethinkdb connection #18

ziasultan2 opened this issue May 11, 2020 · 2 comments

Comments

@ziasultan2
Copy link

Hi dear. Can I connect remote database with this package along with my database login credentials

@marceloneppel
Copy link
Owner

Hi @ziasultan2! You can try something like:

var sslmap = {
  'ca': './path/certificate.pem',
};
// Create the database connection.
connection = await r.connect(
    db: 'test',
    host: 'your-database-host.com',
    port: 29015,
    user: 'admin',
    password: 'password',
    ssl: sslmap);

@Cyrus-0101
Copy link

Hello @marceloneppel, After writing this piece of code,

var sslmap = {
'ca': '../../credentials/cert.pem',
};
connection = await r.connect(
db: 'test',
host: 'my-database-host.com',
port: 28015,
user: 'abc',
password: 'abc'
ssl: sslmap,
);

I seem to get this error,

FileSystemException: Cannot open file, path = '../../credentials/isrgrootx1.pem' (OS Error: No such file or directory, errno = 2)

Am I not doing it right. That is exactly where the file lives after bringing it from import it works but can't read it after importing directly from imports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants