Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 Log into the MySQL database.
  2. Run the below query in your database to grant select SELECT permission to the specified a specific user.

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

    Refer to the below example:

    Code Block
    languagesql
    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 under the BOBSWIFT configuration Configuration section.
  5. Switch to tab View and modify data source profiles and click on the button +Add profile.
  6. To fill the required details in the below screen, refer to this link.
     Here in  In the fields Username and Password, add the details of the user that you have created in the database with read-only access.
  7. After entering all the details, click on the click Test connection button. If the given details are correctaccurate, it will display displays a message Connection successfully as successful as shown in the below screenshot.
  8. Click Nextbutton.
  9. Click Save profile button to  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  user as Data source profile under the SQL statement section and enter the SQL statement to insert data as shown in the below screenshot:
    Image Modified

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

...