Connect OVHcloud MySQL to Infograph
What it brings in: Every table and view the user can read.
What you need
- An OVHcloud Public Cloud Databases for MySQL service.
- Access to the service in the OVHcloud Control Panel.
- 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://avnadminuser: fix for "The username or password was not accepted.":[password]password: fix for "The username or password was not accepted."@mysql-[id].database.cloud.ovh.nethost: fix for "We couldn't find that host. Check the host name, then try again.":[port]port: fix for "The host refused the connection. Check the port, and that your database accepts connections from Infograph's address."/defaultdbdatabase: fix for "That database does not exist on this server."?ssl-mode=REQUIREDSteps
Allow Infograph's sync servers
In the Control Panel, open Public Cloud, choose your project, click Databases and open your MySQL service. On the Configuration tab, in the IPs section, enter each address below in IP address or IP/mask, add a description, click Add, then save the changes. Until an address is allowed, the service accepts no connections at all.
51.222.152.247/32Create a read-only user
Infograph only reads. Users added on the Users tab get full privileges, so create this one in SQL instead. Connect as avnadmin and run this, with your own password and database name, usually defaultdb.
CREATE USER 'infograph'@'%' IDENTIFIED BY '[strong-password]'; GRANT SELECT, SHOW VIEW ON [database].* TO 'infograph'@'%';Copy the Service URI
On the Dashboard tab, under Connection information, copy the Service URI. OVHcloud gives each service its own port, so keep the one in the URI. Then put the user you created, and its password, in place of avnadmin's.
mysql://avnadmin:[password]@mysql-[id].database.cloud.ovh.net:[port]/defaultdb?ssl-mode=REQUIREDPaste it in Infograph and choose your tables
Open OVHcloud MySQL in Infograph, paste the string and press Connect. SSL Mode is Required, as OVHcloud requires. 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, so only the network the service is attached to can reach it. Use the service's public address, or connect through an SSH server in that network under Advanced.
We couldn't find that host. Check the host name, then try again.
Copy the Service URI again from Connection information rather than typing the host. It ends in database.cloud.ovh.net.
The host refused the connection. Check the port, and that your database accepts connections from Infograph's address.
OVHcloud services use a port of their own, not 3306. Copy the port from the Service URI on the Dashboard tab.
The server closed the connection. Check that it allows Infograph's address, and whether it requires an encrypted connection.
Check 51.222.152.247 are in the IPs section of the Configuration tab, and that SSL Mode is Required under Advanced: OVHcloud accepts only encrypted connections.
The host did not answer in time. Check the host and port, and that your firewall allows Infograph's address.
Usually the IP list: OVHcloud accepts no connections until an address is allowed. Add 51.222.152.247 on the Configuration tab, in the IPs section, and save the changes.
The username or password was not accepted.
OVHcloud shows a password only when the user is created or the password is reset. If you no longer have avnadmin's, open the Users tab, click ... next to the user and choose Reset password. Characters such as @, # or / must be percent-encoded in a string, so @ becomes %40.
Those credentials were not accepted.
Check the user and password in the string, and that the user was created as 'infograph'@'%', so it may connect from outside.
That database does not exist on this server.
The database name is the part after the last / in the string. A new service's database is defaultdb; the Databases tab lists the others.
This server does not offer an encrypted connection. Turn on TLS on the server, or set SSL Mode to Preferred.
OVHcloud always encrypts its MySQL services, so the host is probably not the service's own. Copy the Service URI again from Connection information.
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.