在App.config中存储MySQL连接字符串时,providerName属性应设置为什么值?

JMK*_*JMK 9 .net mysql app-config

在App.config中存储MySQL连接字符串时,providerName属性应设置为什么值?

例如,在下面的App.config文件中,我应该为providerName使用什么值?有关系吗?

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <connectionStrings>
    <add name="MySQL" connectionString="SERVER=8.8.8.8; DATABASE=foo; UID=bar; PASSWORD=foobar" providerName="WhatGoesHere?" />
  </connectionStrings>
</configuration>
Run Code Online (Sandbox Code Playgroud)

Jof*_*yHS 16

试试这个:

<connectionStrings>
<add name="MySQL" connectionString="SERVER=8.8.8.8; DATABASE=foo; UID=bar; PASSWORD=foobar" providerName="MySql.Data.MySqlClient" />
</connectionStrings>
Run Code Online (Sandbox Code Playgroud)