N O T I C E


MSPbots WIKI is moving to a new home at support.mspbots.ai to give you the best experience in browsing our Knowledge Base resources and addressing your concerns. Click here for more info!


You need to give MSPbots read-only access to your company's SQL server so that we can pull data from your server without modifying or deleting entries. Read-only access to your database also helps us create datasets for your use. 

What's in this article

 

Creating a read-only account for MySQL

  1. Log in to the MySQL Console using the root or admin account.
    MySQL console

  2. Create a new account that allows remote access and set a password. Type the following command: 
    CREATE USER 'mspbots'@'%' IDENTIFIED BY '123456';

    where
    %’ allows remote access,
    mspbots‘ is the Login name, and
    123456’ is the Password.

    To delete an existing account, use the following command:
    DROP USER 'mspbots'@'%';

  3. Next, grant read-only permissions to the MySQL account. Type the following command: 
    GRANT SELECT ON autotest.* TO 'mspbots'@'%';

    where 
    'SELECT' allows read-data access only, 
    'autotest' is the name of the database to which you want to synchronize data with MSPbots, and 
    '.*' is ALL the tables or the specific tables that can be selected for synchronization.

  4. Restart the MySQL server. 

    restart MySQL 

Creating a read-only account for the SQL server 

  1. Log in to SQL Server Management Studio and right-click on New Login
    SQL new login
  2. On the Login Properties - mspbots window, type mspsqlagent on the field for Login name and select the SQL Server authentication radio button. 
  3. Enter and confirm the Password, and tick the checkboxes for Enforce password policy and Enforce password expiration.
    SQL login properties 
  4. Next, go to User Mapping. Select the database that you want to synchronize and put checkmarks on the db_datareader and public checkboxes.

    user mapping 
  5. Then, go to Status > Settings. Open the account by selecting the radio buttons for Grant under Permission to connect to database engine, and Enabled under Login.

    status
  6. Click OK to save the settings.