title: WebMatrix + MySQL Linking
body: <p>I use WebMatrix to write my site (C#/MVC3) and I am using a local mysql server (not installed through webmatrix) to store all my data, so i tried to go to the Connections tab and add my server in there as a <code>New Connection</code>. But it just gives me an error no matter what i put for the <code>Host</code>. I know the db name, username &amp; password are correct.</p>
  
  <p>web.config:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;configuration&gt;
      &lt;connectionStrings&gt;
          &lt;add connectionString="Uid=username;Server=localhost;Database=mydb;Pwd=pass" name="localhost" providerName="System.Data.SqlClient" /&gt;
      &lt;/connectionStrings&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>@{
      Page.Title = "Comics";
  
      var db = Database.Open("localhost");
      var comics = db.Query(@"SELECT * FROM comics ORDER BY arc ASC").ToList();
  }
  
  &lt;h1&gt;@Page.Title&lt;/h1&gt;
  
  &lt;ul class="thumbnails gallery"&gt;
      @foreach (var comic in comics) {
          &lt;li&gt;@comic.Arc&lt;/li&gt;
      } 
  &lt;/ul&gt;
  </code></pre>
  
  <p>Error</p>
  
  <pre><code>A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
  </code></pre>
  
  <p>Any help is greatly appreciated!</p>
  
  <p>EDIT:</p>
  
  <p>I installed the MySQL connector and i am still getting an error:</p>
  
  <pre><code>Unable to find the requested .Net Framework Data Provider.  It may not be installed. 
  </code></pre>
  
  <p>I downloaded it from: <a href="http://dev.mysql.com/downloads/mirror.php?id=403991" rel="nofollow">http://dev.mysql.com/downloads/mirror.php?id=403991</a> and just installed it with the default settings. Am i supposed to install it into the webmatrix directory?!?</p>
  
  <p>New web.config:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;configuration&gt;
      &lt;connectionStrings&gt;
          &lt;add connectionString="Server=localhost;Database=mydb;Uid=user;Pwd=pass;" name="localhost" providerName="MySql.Data.MySqlClient.MySqlConnection" /&gt;
      &lt;/connectionStrings&gt;
  &lt;/configuration&gt;
  </code></pre>