Business Connectivity Services In SharePoint 2013 and MySQL using Meta Man

In this walkthrough we will demonstrate how to integrate MySQL database with Microsoft SharePoint 2013 through ODBC and display the data on SharePoint 2013 page. In order to do that we will describe how to create a new external content type for MySQL by means of Meta Man.

 

  1. Prerequisites:
    • SharePoint Server 2013
    • Meta Man (it doesn’t necessarily need to be installed on the SharePoint server but it requires .net Framework 4.5 installed on the machine where you are going to run Meta Man from)
    • MySQL database server with any sample database
    • Windows 64-bit, Connector/ODBC 5.1.12 must be installed on the machine where SharePoint 2013 is running and on the machine where you are going to run Meta Man from.

     

  2. Open Meta Man. To connect to My SQL server click ODBC data source item on the left pane on the initial screen.Click ODBC connection
  3. Select MySQL as data source type. Enter ODBC connection string (for example it can be “Driver={MySQL ODBC 5.1 Driver};Server=canopus;Port=3306;Database=world;Uid=root;Pwd=12345;Trusted_Connection=yes;”). Press arrow in order to connect to MySQL data source.Connect to MySQL database
  4. Upon successfully connecting to MySQL server you’ll see another window. In order to get a list of tables click “Tables” item in the list on the left pane.Click "Tables" item
  5. Now we can see listed all the tables for this particular database.List of tables
  6. We create an external content type by dragging and dropping a table onto our design surface which is the large area on the right side. We will be working with the “country” table, to add it to the model , just drag it onto the “Diagram”.Drag a table on the design surface
  7. When you drop the table you will be shown the following dialog, which allows to configure the external content type before creation. You may modify the external content type name, change identifier and add the methods to the external content type. In this example we’ll accept all default values and click “Create” button.Configure the external content type
  8. You can see created external content type on the design surface with the listed methods and identifier.Created external content type
  9. Now all we need to do is to deploy our BDC model. First we need to set URL of where you want to deploy your model. We set this URL by going “Settings” from the title bar. Meta Man settings
  10. In the model deployment URL textbox you should manually type URL of SharePoint 2013 Central Administration . Click “Save” button.Set BDC model deployment URL
  11. Once you have saved the URL to deploy your BDC model file to simply click “Deploy” button and your BDC model file will get deployed.Deploy BDC model file
  12. SharePoint 2013 will now go through and validate your BDC model file is correct, once it is done you will get a success dialog.BDC Model was imported
  13. Browse to the site where you want to add the External List. Click “Site Contents”->”add an app”.Add an app to SharePoint site
  14. Select “External List”Select “External List”
  15. Enter a name for External list and click on the icon to show the available External Content Types External list name
  16. Select our generated world_MetaMan.country External Content Type, click “OK” Select External Content Type
  17. Click “Create”Create External List
  18. Your external data from MySQL database is now displayed in the SharePoint External ListExternal data from MySQL database is displayed on SharePoint 2013 page

We hope this walkthrough will be useful for you. If you have any questions feel free to email them to support@lightningtools.com

<Dmitry Kaloshin/>