Connect MariaDB to Infograph
What it brings in: Every table and view the user can read.
What you need
- A MariaDB server that accepts connections from the internet, or an SSH server that can reach it.
- Permission to create a user, and to change who can connect: your firewall or bind-address.
- 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.
mysql://[user]user: fix for "The username or password was not accepted.":[password]password: fix for "The username or password was not accepted."@[host]host: fix for "We couldn't find that host. Check the host name, then try again.":3306port: fix for "The host refused the connection. Check the port, and that your database accepts connections from Infograph's address."/[database]database: fix for "That database does not exist on this server."Steps
Allow Infograph through your firewall
Let the addresses below reach the server's port, usually 3306, in your firewall or cloud network rules.
51.222.152.247/32Create a read-only user
Infograph only reads. Give it its own user so you can see and revoke its access in one place. Run this as an admin user, with your own password and database name.
CREATE USER 'infograph'@'%' IDENTIFIED BY '[strong-password]'; GRANT SELECT, SHOW VIEW ON [database].* TO 'infograph'@'%';Write your connection string
MariaDB uses MySQL's connection string. Fill in your host, port, database, user and password.
mysql://[user]:[password]@[host]:3306/[database]Paste it in Infograph and choose your tables
Open MariaDB in Infograph, paste the string and press Connect. Pick the tables you want and Infograph starts loading them. SSL Mode is Preferred, so Infograph uses TLS when your server offers it.
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, such as localhost, 10.x or 192.168.x, so only your own network can reach it. Use the database's public address, or connect through an SSH server under Advanced.
We couldn't find that host. Check the host name, then try again.
The host name does not resolve. Copy it again from your provider, and check it is the public address rather than an internal one.
The host refused the connection. Check the port, and that your database accepts connections from Infograph's address.
Nothing accepted the connection on that port. Check the port, and that MariaDB listens on a public interface: bind-address must not be 127.0.0.1, and skip-networking must be off.
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 it allows 51.222.152.247: some hosts close the connection rather than refuse it. If the server accepts only encrypted connections, set SSL Mode to Required under Advanced.
The host did not answer in time. Check the host and port, and that your firewall allows Infograph's address.
Usually a firewall dropping the connection. Allow 51.222.152.247 on your database's port. If the database is on a private network, connect through an SSH server under Advanced.
The username or password was not accepted.
Check the user and password in the string. A password with characters such as @, #, / or a space must be percent-encoded in a connection string, so @ becomes %40. Or enter the details separately instead.
Those credentials were not accepted.
Check the user and password, and that the user may connect from outside: a user created as 'infograph'@'localhost' cannot. Create it as 'infograph'@'%' instead. Special characters in the password must be percent-encoded, so @ becomes %40.
That database does not exist on this server.
The database name is the part after the last / in the string. Check its spelling, for example with SHOW DATABASES; in the mysql client.
This server does not offer an encrypted connection. Turn on TLS on the server, or set SSL Mode to Preferred.
SSL Mode is set to Required, but the server would not encrypt the connection. Turn on TLS on the server, and check the host is the database's own address rather than a proxy in front of it. Or set SSL Mode to Preferred under Advanced.
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.