# Mysql and Miniprofiler

**URL:** <https://community.miniprofiler.com/t/mysql-and-miniprofiler/29>\
**Category:** .NET\
**Created:** [May 14, 2013, 7:28am UTC](https://community.miniprofiler.com/t/mysql-and-miniprofiler/29 "2013-05-14T07:28:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![benoitgaly](https://avatars.discourse-cdn.com/v4/letter/b/9fc348/32.png) [@benoitgaly](https://community.miniprofiler.com/u/benoitgaly)\
**Post date:** [May 14, 2013, 7:28am UTC](https://community.miniprofiler.com/t/mysql-and-miniprofiler/29/1 "2013-05-14T07:28:44Z")

</div>

Hi, I cannot have the below code working. Either I am providing MySqlScript with an invalid format, either I am using InnerConnection which makes the previous line of code useless. Any idea ? Am I missing something ?

Tx in advance,

```
var connection = CreateConnection();
var profile = new ProfiledDbConnection(connection, UoW.UoW.Profiler);
var mysqlScript = new MySqlScript(profile.InnerConnection as MySqlConnection)
                      {
                          Query = script
                      };
mysqlScript.Execute();
```
