Hostname and Port
To connect any database client application to PolyScale, firstly, update the
database hostname to use the domain
psedge.global. Select the appropriate port
based on the database type:
- SQL Server
Finally, any database client must specify a PolyScale cache identifier
(found in the user interface under the cache
Settings tab or via the API).
This tells PolyScale which cache to use and therefore which upstream database to
connect to. The method of how this is specified as part of the database
connection credentials is database specific. See below for details on each
MySQL, MariaDB and SQL Server
To connect to a MySQL, MariaDB or SQL Server database via PolyScale, a database
username must be provided that contains the polyscale
cache identifier. The cache id can be found under the
Settings tab of each cache within the user interface.
Simply prepend the cache id to the origin database username, separated by a hyphen.
If the username provided by PolyScale is
abc and the origin database username
foobar, the database username to connect via PolyScale would be
Testing MySQL Connectivity
mysql -h psedge.global \
-u [cacheid]-[dbuser] \
For PostgreSQL databases, PolyScale supports two options for passing the
cache identifier as part of the connection string. If you
have access to the Postgres connection URI (typically this is an environment
variable for web applications, microservices etc.), an additional
application_name parameter is appended to the connection string (see
Option 1 below).
Sometimes it's not possible to modify the connection URI, such as in desktop tools where a UI dictates the available parameters. In these situations a specific database username can be created that is utilized by PolyScale (see Option 2 below).
Option 1 - Append application_name
application_name parameter to the connection string containing the
PolyScale cache identifier. The cache id can be found under the
of each cache within the user interface.
application_name key with the PolyScale cache id value to the
Read more about PostgreSQL connection strings from the PostgreSQL documentation
and more about the
If it is required to use the
application_name property, simply prepend the
PolyScale cache id to the desired application name separated by a hyphen and it
will be passed to the PostgreSQL server as normal.
Option 2 - Database Username
PolyScale can also use a cache identifier specified as the database username. In this case, a database user must be created with a username identical to the cache id provided by PolyScale.
For example, if the cache id is
CREATE USER "8255a89a-4365-4e64-8e78-38db272d8fdd" WITH ENCRYPTED PASSWORD 'foo';
GRANT ALL PRIVILEGES ON DATABASE employees TO "8255a89a-4365-4e64-8e78-38db272d8fdd";
string. This can be useful for identifying PolyScale database users.
For example, if the cache ID was
database user could be named
When creating a database user and granting privileges, be sure to only grant the minimum needed for the purpose.
Testing PostgreSQL Connectivity
psql "host=psedge.global \
If you would like to test connectivity using a a desktop client application, we
recommend JetBrains DataGrip as it
supports setting the
application_name property. See
for further information.