Skip to end of banner
Go to start of banner

How to create a database profile with read_only access in SQL for Confluence

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

This article explains how to create a database profile with read_only access for app SQL for Confluence (Pro Edition).

Instructions

Follow the below steps:

  1. Login to the MySQL database.
  2. Run the below query in your database to grant select permission to the specified user.

    GRANT type_of_permission ON database_name.table_name TO 'username'@'localhost’;

    Refer to the below example:

    GRANT SELECT ON Confluence_database.* TO 'confluence_user'@'localhost';
  3. Log in as a Confluence Administrator and click  General configuration.
  4. From the left side panel, click SQL (Pro Edition) in the BOBSWIFT configuration section.
  5. Switch to tab View and modify data source profiles and click on Add profile.
  6. To fill the required details in the below screen, refer to this link.
     Here in Username and Password add the user you have created in the database with read-only access.
  7. After entering all the details, click on the Test connection button. If details are correct, it will display a message Connection successfully as shown in the below screenshot.
  8. Click Next button.
  9. Click Save profile button to save this new database profile.
  10. Verify that the new profile is available here.
  11. Navigate to the required page and click the Edit icon ().
  12. Add SQL macro and click Edit to open the macro settings.

  13. Select the read-only user Data source profile under the SQL statement section and enter the SQL statement to insert data as shown:


  14. Click Save settings.
  15. Click on Save button page.
  16. It will display the below message as the user has only read-only access to the database.


  • No labels