带有MySQL的C#-错误:“向导应包含32个数字和4个破折号"尝试打开连接时 [英] C# with MySQL - Error: "Guid should contain 32 digits with 4 dashes" when trying to open the connection

查看:62
本文介绍了带有MySQL的C#-错误:“向导应包含32个数字和4个破折号"尝试打开连接时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个软件,现在该测试它与在线服务器的连接了.我正在使用Visual Studio在C#中进行开发,而我正在尝试连接到MySQL服务器.具体来说,我试图连接到db4free服务器上的测试服务器.我将ConnectionString更改为:

Im developed a software and it's now time to test it connection to a online server. Im developing in C# using Visual Studio and I'm trying to connect to a MySQL server. To be specifc Im trying to connect to a test server at db4free server. I changed my ConnectionString to:

connectionString = "SERVER=db4free.net;PORT=3306;DATABASE=prpsystem;UID=database;PWD=password;";

但是当我尝试打开连接以检查登录是否正确时,Visual Studio会显示此消息错误:

But when I try to open the connection to check if the login is OK the visual studio shows this message error:

向导应包含32个数字和4个破折号.

Guid should contain 32 digits with 4 dashes.

你们知道发生了什么吗?感谢您的帮助.

Do you guys know what is happening? Thanks for the help.

推荐答案

您的崩溃来自 Driver.LoadCharacterSets ,它是错误92982 .

Your crash is coming from Driver.LoadCharacterSets, which is executing SHOW COLLATION. This is bug 92982 that has been reported against the Connector/NET driver.

根据该案例中的OP,他通过禁用my.cnf(用于MySQL Server)中的设置来解决了该问题.如果您还具有该设置,请尝试将其禁用以查看是否可以解决问题.

According to the OP on that case, he fixed the problem by disabling the skip-character-set-client-handshake setting in his my.cnf for MySQL Server. If you also have that setting, try disabling it to see if it resolves the problem.

否则,您可以切换到 MySqlConnector ,这是MySQL的另一种ADO.NET库,它没有这个错误.

Otherwise, you could switch to MySqlConnector, an alternate ADO.NET library for MySQL, which doesn't have this bug.

这篇关于带有MySQL的C#-错误:“向导应包含32个数字和4个破折号"尝试打开连接时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆