" CreateSemaphore"使用SQLProvider

时间:2016-07-17 01:43:47

标签: mysql f# type-providers

module test = 

  let [<Literal>] resolutionPath = __SOURCE_DIRECTORY__ + @"/../packages/SQLProvider/lib/"
  let [<Literal>] connectionString = "Data Source=localhost"
  type sql = SqlDataProvider< 
              ConnectionString = connectionString,
              DatabaseVendor = Common.DatabaseProviderTypes.MYSQL,
              ResolutionPath = resolutionPath,
              IndividualsAmount = 1000, 
              UseOptionTypes = true>

这是我收到的确切错误消息

  

类型提供程序&#39; FSharp.Data.SqlTypeProvider&#39;报告错误:CreateSemaphore(FS3003)

不知道该怎么做,任何建议都将不胜感激!

1 个答案:

答案 0 :(得分:0)

此错误来自MySQL,而不是来自typeprovider。我认为你的connectionstring不是MySQL连接字符串。试试这个:

let [<Literal>] connectionString = @"server=localhost;database=myDatabase;uid=root;pwd=..."

您还可以尝试将Owner-parameter添加为您的数据库名称。