Connect Amazon RDS for SQL Server to Infograph
What it brings in: Every table and view the user can read.
What you need
- An RDS for SQL Server instance, and access to it in the AWS console.
- The master username and password, or another SQL Server login.
- Infograph's sync servers connect from 51.222.152.247.
Your connection string
Each part is one thing you fill in, and each can fail on its own.
Server=[db-instance-id].[random-id].[region].rds.amazonaws.comhost: fix for "We couldn't find that host. Check the host name, then try again.",1433port: fix for "The host refused the connection. Check the port, and that your database accepts connections from Infograph's address.";Database=[database]database: fix for "That database does not exist on this server.";User Id=[master-username]user: fix for "The username or password was not accepted.";Password=[password]password: fix for "The username or password was not accepted.";Encrypt=True;Steps
Copy the endpoint
In the RDS console, open Databases, choose your instance and open the Connectivity & security tab. Copy the Endpoint and note the Port, usually 1433.
Make it reachable from Infograph
The instance must show Publicly accessible as Yes. Then add an inbound rule to its VPC security group for the addresses below on port 1433. If the instance must stay private, connect through an SSH server under Advanced instead.
51.222.152.247/32Create a read-only user
Infograph only reads. Give it its own login so you can see and revoke its access in one place. Run this as the master user, with your own password and database name.
CREATE LOGIN infograph WITH PASSWORD = '[strong-password]'; USE [database]; CREATE USER infograph FOR LOGIN infograph; ALTER ROLE db_datareader ADD MEMBER infograph;Write your connection string
The console shows no connection string, so put the endpoint, port and database together like this, with the login you created in place of the master username. The port goes after a comma.
Server=[db-instance-id].[random-id].[region].rds.amazonaws.com,1433;Database=[database];User Id=[master-username];Password=[password];Encrypt=True;Paste it in Infograph and choose your tables
Open Amazon RDS for SQL Server in Infograph, paste the string under Connection string and press Connect. Pick the tables you want and Infograph starts loading them.
Allow 51.222.152.247 through your firewall so Infograph can connect.
Connect
Troubleshooting
Each entry is the message Infograph shows when a connection fails. Open it for the fix.
This host is not reachable from Infograph. Use your database's public address.
The address is private. RDS Proxy endpoints (they contain .proxy-) are reachable only inside your VPC. Use the instance's own endpoint with Publicly accessible set to Yes, or connect through an SSH server under Advanced.
We couldn't find that host. Check the host name, then try again.
Copy the Endpoint again from the Connectivity & security tab. It ends in .rds.amazonaws.com.
The host refused the connection. Check the port, and that your database accepts connections from Infograph's address.
Check the Port on the Connectivity & security tab, usually 1433, and that the security group allows 51.222.152.247 on it.
The server closed the connection. Check that it allows Infograph's address, and whether it requires an encrypted connection.
The server answered, then hung up before Infograph could sign in. Check its firewall allows 51.222.152.247, and that the host and port are the database's own rather than a proxy in front of it.
The host did not answer in time. Check the host and port, and that your firewall allows Infograph's address.
Usually the security group. Add an inbound rule for 51.222.152.247 on port 1433 to the instance's VPC security group, and check Publicly accessible is Yes on the Connectivity & security tab.
The username or password was not accepted.
SQL Server refused the login (error 18456). RDS always accepts SQL Server logins, so check the username and password, and that the login is enabled. In a Server=...; string, put a password containing ; in double quotes.
Those credentials were not accepted.
Check the username and password, then the database name. The login needs a user in that database: run the CREATE USER and ALTER ROLE lines from the steps in it.
That database does not exist on this server.
SQL Server signed you in but could not open the database. Check its spelling and case against the list from SELECT name FROM sys.databases. If the name is right, the login has no user in that database: run the CREATE USER and ALTER ROLE lines from the steps in it.
Through an SSH server
Infograph could not reach your SSH server. Check its address and port, and that it allows connections from Infograph's address.
Check the SSH server's public address and port, and that its firewall allows 51.222.152.247 on that port, usually 22.
Your SSH server only offers old encryption settings. Infograph needs a current OpenSSH with an Ed25519, ECDSA or RSA (SHA-2) host key.
Your SSH server only offers old encryption settings. Update OpenSSH on it. It needs an Ed25519, ECDSA or RSA (SHA-2) host key.
Your SSH server refused Infograph's key. Check the key is in authorized_keys for that user.
Add Infograph's public key, shown in the form when you turn on SSH, to ~/.ssh/authorized_keys for the SSH user you entered. Check that user exists and that the file is readable only by them.
Your SSH server's identity changed. If you expected this, trust the new server on the connection.
Infograph remembers your SSH server's key from the first connect, and the server now shows a different one. If you rebuilt or replaced the server, open the connection and press Trust the new server. If you did not, ask whoever runs the server before you trust it.
This connection has not trusted an SSH server yet. Open the connection and use Re-discover streams to trust it.
The connection has not checked your SSH server yet. Open the connection and press Re-discover streams. Infograph then remembers the server's key.
Your SSH server would not forward to the database host. Check the permitopen rule and the database host and port.
The SSH server would not pass the connection on to the database. In authorized_keys, the permitopen rule must name the database host and port exactly as you entered them. In sshd_config, AllowTcpForwarding must not be no. The database must also accept connections from the SSH server, for example in its firewall or security group.