Skip to main content

Manage Database Access

Frappe Cloud allows you to create external database users for your site so you can connect reporting, analytics, and business intelligence tools directly to your database. You can control each user’s permissions, view connection credentials, monitor database activity, and revoke access whenever required.

Note

Database Access is available only for sites on USD 50/month and above plans.

Available Permission Levels

When creating a database user, you can choose one of the following permission levels:

  • Read Only – Allows users to view data without making any changes.
  • Read Write – Allows users to read, insert, update, and delete data across the database.
  • Granular Access – Provides fine-grained control by allowing access to specific tables and, if required, selected columns only.

Manage Database Users

  1. Open your Site Dashboard.
  2. Navigate to Actions.
  3. Select Manage Database Users.

From this page, you can create new users, update permissions, view credentials, monitor access logs, and delete existing database users.

Create a Database User

  1. Click Add User.
  2. Enter the required user details.
  3. Select one of the available permission modes:
    • Read Only
    • Read Write
    • Granular Access
  4. Save the user.

Using Granular Access

Granular Access lets you define permissions at the table and column level.

  • Select which database tables the user can access.
  • Assign either Read Only or Read Write permissions for each table.
  • Optionally restrict access to specific columns within a table.
Note

When configuring Granular Access, Frappe Cloud first loads your database schema. Depending on the size of your database, this process can take anywhere from 30 seconds to 5 minutes.

Edit a Database User

  1. Locate the required database user.
  2. Open the row menu.
  3. Select Configure User.
  4. Update the required permissions.
  5. Save your changes.

Permission changes may take a short time to become effective.

Important

If the user previously had global Read Only or Read Write privileges, the updated permissions apply only to new database connections. Existing connections continue using their current permissions until they reconnect.

View Database Credentials

To retrieve the connection details for a database user:

  1. Open the row menu beside the user.
  2. Select View Credential.

The dialog displays all the information required to connect external applications or SQL clients to your site’s database.

Delete a Database User

  1. Open the row menu for the user.
  2. Select Delete User.
  3. Confirm the deletion.

Once deleted, the user can no longer access the database.

View Access Logs

To monitor database activity:

  1. Open Manage Database Users.
  2. Click View Logs.
  3. Filter log entries using keywords or client IP addresses.

Access logs help you audit SQL queries that pass through the Frappe Cloud SQL Proxy service.

Connect External Analytics Tools

You can use the generated database credentials with analytics and business intelligence platforms such as:

  • Frappe Insights
  • Metabase
  • Apache Superset
  • Looker Studio
  • Power BI Desktop
  • Zoho Analytics
  • Any other SQL-compatible analytics tool that supports MariaDB over TLS.

Connect Using the MariaDB Command Line Client

You can also connect directly using the MariaDB or MySQL command-line client.

  1. Copy the connection command from the database credentials dialog.
  2. Run the command in your terminal.
  3. Enter the database password when prompted.

Ensure that mariadb-client or mysql-client is installed on your local machine before connecting.

Security Best Practice

Frappe Cloud accepts only TLS/SSL encrypted connections. When connecting external applications, ensure your client uses SSL/TLS and the appropriate certificate chain for *.frappe.cloud to keep your database connections secure.

Frequently Asked Questions

Why do I get “Lost connection to server during query”?

Some database clients hide the actual MariaDB error and only display a generic connection message. If you encounter this error, try running the same query using the MariaDB or MySQL command-line client. The CLI typically returns the complete error message, making troubleshooting much easier. If the issue appears to be server-related, include the exact error when contacting Frappe Cloud Support.

Why doesn’t the database timezone match my site’s timezone?

This is expected behavior. The MariaDB system timezone is independent of the timezone configured under your site’s System Settings. Frappe manages application timezones internally, so the difference does not affect normal application behavior.

Rating: 0 / 5 (0 votes)