Documentation

Whitelist IP Address on the DB Server

 

After your Database server is accessible, you may need to set up your Database engine itself to accept connections from datapine servers.

 

When connecting your database to datapine you will need to whitelist our IP addresses to enable our server to access your database. Use the following IP addresses 83.141.3.27, 83.141.3.28 and 83.141.3.29 to allow us to access your database with the provided user.

 

Below we have listed some predefined commands that you can paste into your corresponding database control panel to whitelist our IPs. Simply replace the placeholders with your database name, user and password and run the command.

 

MySQL

 

If you are connecting a MySQL database, paste the following command into your control panel to whitelist our IP addresses and to be able to connect to your database.

 

GRANT SELECT, SHOW VIEW

ON $db_name.*

TO $userName@`83.141.3.27` IDENTIFIED BY ‘$userPassword’;

GRANT SELECT, SHOW VIEW

ON $db_name.*

TO $userName@`83.141.3.28` IDENTIFIED BY ‘$userPassword’;

GRANT SELECT, SHOW VIEW

ON $db_name.*

TO $userName@`83.141.3.29` IDENTIFIED BY ‘$userPassword’;

FLUSH PRIVILEGES;

 

Postgres

 

When connecting a Postgres database, you have to modify the pg_hba.conf file to accept connections from our IPs. You can read this doc about the pg_hba.conf file in general: http://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html

 

An example of a possible lines to add in the pg_hba.conf file is the following:

 

#TYPE   DATABASE    USER           CIDR-ADDRESS           METHOD

host    $db_name     $userName      83.141.3.27            md5

host    $db_name     $userName      83.141.3.28            md5

host    $db_name     $userName      83.141.3.29            md5

 

Please note that the database and user values should be adapted to your database. The method to use can vary according to your database. We support SSL connections, just add the necessary parameters in the “Extra JDBC param” field in the database connection setup.

 

Oracle

 

In case of an Oracle database all we need is to be able to connect to the Oracle Net Listener, meaning the access authorization is done on network levels. Check our docs about how to set up your firewall or how to set up SSH connections to your DB Server.

 

See detailed Oracle doc here: https://docs.oracle.com/cd/E17781_01/server.112/e18804/network.htm#ADMQS157

 

MS SQL Server

 

In case of an MS SQL Server, there is just an option to set up so that the server accepts remote connections. There is two ways to set this option:

 

Using a Transact SQL query:

 

USE $db_name;

GO

EXEC sp_configure ‘remote access’, 0 ;

GO

RECONFIGURE ;

GO

 

Using SQL Server Management Studio

 

  • In Object Explorer, right-click a server and select Properties.
  • Click the Connections node.
  • Under Remote server connections, select or clear the Allow remote connections to this server check box.

See detailed MS SQL doc here: https://msdn.microsoft.com/en-us/library/ms191464.aspx