I was wondering if someone has had the error
"ByteFX.Data.MySqlClient.MySqlException: Bad handshake" when trying to talk
to a MySQL 5.0.0a database when using ByteFX's ADO.NET data provider.

I used pretty much the same code to connect to a table in an Access Database
with no problem.

The code and the error page I get are shown below.

Any help would be greatly appreciated.
 
Thanks,
Dominique
 
<%@ Page Language="C#" Debug="true" %>
<%@ import Namespace="ByteFX.Data.MySqlClient" %>
<script runat="server">
 
    public void Page_Load()
    {
        String mySqlConnectionString
="DataSource=localhost;Database=test;Username=dplante;Password=secret;Persis
t Security Info=true";
        MySqlConnection dbconn = new MySqlConnection(mySqlConnectionString);
        dbconn.Open();
        String sql="SELECT * FROM update_track";
        MySqlCommand dbcomm=new MySqlCommand(sql,dbconn);
        MySqlDataReader dbread = dbcomm.ExecuteReader();
        update_track.DataSource = dbread;
        update_track.DataBind();
        dbread.Close();
        dbconn.Close();
    }
 
</script>
<html>
<head>
</head>
<body>
    <form runat="server">
        <asp:Repeater id="update_track" runat="server">
            <HeaderTemplate>
                <table border="1" width="100%">
                    <tr>
                        <th>update_id</th>
                        <th>description</th>
                        <th>os</th>
                        <th>bugTraqID</th>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                   
<td><%#DataBinder.Eval(Container.DataItem,"update_id")%></td>
                   
<td><%#DataBinder.Eval(Container.DataItem,"description")%></td>
                    <td><%#DataBinder.Eval(Container.DataItem,"os")%></td>
                   
<td><%#DataBinder.Eval(Container.DataItem,"bugTraqID")%></td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>
    </form>
</body>
</html>
 
ERROR PAGE I GET:
 
Server Error in '/' Application. 
________________________________________
Bad handshake 
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code. 

Exception Details: ByteFX.Data.MySqlClient.MySqlException: Bad handshake

Source Error: 
 
Line 7:          String mySqlConnectionString
="DataSource=localhost;Database=test;Username=dplante;Password=secret;Persis
t Security Info=true";
Line 8:          MySqlConnection dbconn = new
MySqlConnection(mySqlConnectionString);
Line 9:          dbconn.Open();
Line 10:         String sql="SELECT * FROM update_track";
Line 11:         MySqlCommand dbcomm=new MySqlCommand(sql,dbconn);

Source File: C:\dev\sandbox\ASP.NETSandbox\wmSandbox\nwMySQLCS.aspx    Line:
9 

Stack Trace: 
 
[MySqlException: Bad handshake]
   ByteFX.Data.MySqlClient.Driver.ReadPacket() +167
   ByteFX.Data.MySqlClient.Driver.AuthenticateSecurely(Packet packet, String
password) +46
   ByteFX.Data.MySqlClient.Driver.Authenticate(String userid, String
password, Boolean UseCompression) +210
   ByteFX.Data.MySqlClient.Driver.Open(MySqlConnectionString settings) +393
   ByteFX.Data.MySqlClient.MySqlInternalConnection.Open() +45
   ByteFX.Data.MySqlClient.MySqlPool.CreateNewPooledConnection() +168
   ByteFX.Data.MySqlClient.MySqlPool.GetPooledConnection() +454
   ByteFX.Data.MySqlClient.MySqlPool.GetConnection() +56
  
ByteFX.Data.MySqlClient.MySqlPoolManager.GetConnection(MySqlConnectionString
settings) +208
   ByteFX.Data.MySqlClient.MySqlConnection.Open() +69
   ASP.nwMySQLCS_aspx.Page_Load() in
C:\dev\sandbox\ASP.NETSandbox\wmSandbox\nwMySQLCS.aspx:9
   System.Web.Util.ArglessEventHandlerDelegateProxy.Callback(Object sender,
EventArgs e) +10
   System.Web.UI.Control.OnLoad(EventArgs e) +55
   System.Web.UI.Control.LoadRecursive() +27
   System.Web.UI.Page.ProcessRequestMain() +731
 
________________________________________
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
Version:1.1.4322.573


-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Dominique Plante - dplante AT pacbell dot net
Agile Developer for Hire - San Francisco Bay Area
http://www.binaryshift.com
-Founder of the Bay Area Software Developers Tribe -http://basd.tribe.net-



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to