Knowledge Base

How to sync data from a SharePoint list to MySQL database?

BoostSolutions' Data Connector integrates external data sources (SQL Server, Oracle Database, MySQL Database and external SharePoint list) with native SharePoint list, and enables you to sync data from SharePoint list to the external data source.

In this article, we will demonstrate how to connect a SharePoint list to MySQL database, and sync data to MySQL database.

WHAT YOU'LL GET

Connect a SharePoint list to MySQL database

WHAT YOU'LL NEED

The sample data we use for this case

And we have a table named as staff list in the MySQL database test on the MySQL server with the IP address of 192.168.6.137, the table contains same fields as that in the SharePoint list Staff list.

Sync data from a SharePoint list to MySQL database

  1. Download the trial version of Data Connector and install it to your SharePoint server.

  2. Navigate to the site in which the Staff list is located.

  3. In the upper right corner, click Settings and then click Site Settings.

  4. On the Site Settings page, click Data Connector Settings under BoostSolutions Software section in the bottom right corner of the page.

  5. On the Data Connector Settings page, click Create Job.

  6. After clicking Create Job, you will enter the Edit Job page.

    In the Job Name section, specify a unique name for the job, such as job-1.

  7. In the Direction section, specify the direction for the data connection. Select From list to external data option.

    When the direction is set as From list to external data, then the SharePoint list is the data source, and the external data is the target.

  8. In the List section, specify a SharePoint list or Document Library to which you want to sync data to the external data source. Click to browse and select the Staff list from the drop-down list.

    In the Choose a view drop-down list, select a view to filter items, here we select the All contacts view.

    If you select All list items (No filter), it means that all items in the SharePoint list will be exported to external data source.

    Note:

    Note that the personal views will not appear in the drop-down list.

  9. In the External Data and Authentication section, configure the settings as following. Specify the external data type and database authentication. (Ensure the user account you specify has the appropriate permissions to access the external data source.)

    External Data Type: Select MySQL as the external data type.

    Host Name/IP: Enter the host name for the MySQL Server in which the MySQL database is situated or the IP address of the MySQL server.

    Port Number: Enter the TCP/IP port number to connect to the database server (The default port number is 3306).

    Username: Enter a MySQL user name. The user should have Write permission to the database.

    Password: Enter the user’s password.

    Click Connect to connect the MySQL Server we specified. If everything goes right, it will show Connection successful below the Connect button. And the databases existed on the specified MySQL server will be populated to the dropdown list as shown in the picture above.

    Database: Select a database name, here we select test.

  10. In the Data Settings section, specify which external data will be connected to the SharePoint list. Click Specify a table/view to filter option and select staff list (the table Staff list stored in the test database as we described in the sample data section) from the drop-down list as following.

  11. In the Column Mapping section, map the fields in the external database to the columns in the SharePoint list as following.

    Because the columns’ name and type are the same in the SharePoint list and the MySQL database, the columns will be automatically mapped by default.

    Select Last Name column as the key. A “key column” is one that uniquely identifies records and can be used to compare data sources.

    If the columns name or type are different between SharePoint list and external data source, you have to map the columns manually by clicking Add a column mapping link.

  12. Keep other settings as default and click Save to save the settings.

  13. And then you will find that the job has been created on the Data Connector Settings page, the job-1.

  14. Click the Run button for the job-1 and waiting for the job to be run completely.

  15. After the job run completely, click Close. In the MySQL database, check the table Staff list. And then you will find that the items in the SharePoint list Staff list have been synced successfully to the MySQL server database as following.

Login