[英]how to connect F# to MySQL database?
Hello I am a newbie using F# and MySQL. 您好,我是使用F#和MySQL的新手。 I have a project that needs to retrive data from mySQL database.So far, i installed wamp, mySQL, mySQL connector, php.
我有一个项目需要从mySQL数据库中检索数据。到目前为止,我安装了wamp,mySQL,mySQL连接器,php。 I don't know how to contribute F# and mySQL.
我不知道如何贡献F#和mySQL。 Can you please give me a piece of information about the steps .
您能给我一些有关这些步骤的信息吗?
Thanks, 谢谢,
You need a MySQL connector for .NET, this one, for example . 您需要.NET,一个MySQL连接器这一项,例如 。
let connectionStr = "Data Source=localhost; Port=3306; User ID=root; Password=q1w2e3;"
let connection : IDbConnection = upcast new MySql.Data.MySqlClient.MySqlConnection(connectionStr)
See System.Data documentation for detailed information. 有关详细信息,请参见System.Data文档。
Hope this is helpful. 希望这会有所帮助。
F# works with the normal .NET class libraries. F#与普通的.NET类库一起使用。 So any .NET MySQL connector will work.
因此,任何.NET MySQL连接器都可以使用。
For example, this on here: http://dev.mysql.com/downloads/connector/net/ 例如,在这里: http : //dev.mysql.com/downloads/connector/net/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.