Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

I found the documentation for this quite lacking, they literally say to use dbeaver to create connections, export and then use in cloudbeaver. So I will install dbeaver, and try to share some "generic" examples for predefined connections.

https://github.com/dbeaver/cloudbeaver/wiki/Configuring-server-datasources

https://github.com/dbeaver/dbeaver/wiki/Installation

https://github.com/dbeaver/dbeaver/wiki/Admin-Manage-Connections

https://www.md5hashgenerator.com/

http://www.utilities-online.info/xmltojson/#.XqebWWhKiUk

Notes:

  • DBeaver can load multiple connection files. Any files in project folder matching .dbeaver/data-sources*.json pattern will be loaded on startup
  • All secured information (user name, password, secret keys, etc) is stored in the encrypted file .dbeaver/credentials-config.json
PWD=/opt/cloudbeaver/cloudbeaver/deploy/cloudbeaver/workspace/GlobalConfiguration/.dbeaver/
cd $PWD

Example Config:

/opt/cloudbeaver/cloudbeaver/deploy/cloudbeaver/workspace/GlobalConfiguration/.dbeaver# cat data-sources.json
{
        "folders": {},
        "connections": {
                "sqlite_xerial-sample-database": {
                        "provider": "generic",
                        "driver": "sqlite_jdbc",
                        "name": "SQLite - Chinook (Sample)",
                        "save-password": true,
                        "navigator-show-only-entities": false,
                        "navigator-hide-folders": false,
                        "read-only": false,
                        "configuration": {
                                "database": "${project.path}/db/Chinook.sqlitedb",
                                "type": "dev",
                                "auth-model": "native"
                        }
                }
        }
}

PostgreSQL: (NOT WORKING!)

PWD=/opt/cloudbeaver/cloudbeaver/deploy/cloudbeaver/workspace/GlobalConfiguration/.dbeaver/
cd $PWD
cat << 'EOF' >data-sources-postgresql.json
{
        "folders": {},
        "connections": {
                "postgres-jdbc-171bee20d7c-272dcd5ad2bbe925": {
                        "provider": "postgresql",
                        "driver": "postgres-jdbc",
                        "name": "PostgreSQL - postgres",
                        "save-password": false,
                        "show-system-objects": false,
                        "read-only": false,
                        "configuration": {
                                "host": "127.0.0.1",
                                "port": "5432",
                                "database": "postgres",
                                "url": "jdbc:postgresql://localhost:5432/",
                                "type": "prod",
                                "properties": {
                                        "connectTimeout": "20",
                                        "loginTimeout": "20"
                                },
                                "auth-model": "native",
                                "handlers": {}
                        }
                }
        },
        "connection-types": {
                "prod": {
                        "name": "Production",
                        "color": "247,159,129",
                        "description": "Production database",
                        "auto-commit": false,
                        "confirm-execute": true,
                        "confirm-data-change": true
                }
        }
}
EOF
systemctl restart cloudbeaver
  • No labels