MySQL Forums :: MySQL for Visual Studio :: Error: Got packets out of order


Advanced Search

Error: Got packets out of order
Posted by: Ary Rocha ()
Date: March 07, 2016 02:43PM

i Guys , I created a form windows software you need to access an online database to read and write some records, always tested the software with a mysql database on my own computer and everything worked well, I decided to put the online bank as it had a plan hostgator. I upei the bank and created a user to acess it but when trying to connect with Visual Studio 2010 or by string if connection or VS server explorer's own always get the message:

MySql Error: "Got packets out of order".

Remembering that my bank is properly configured with user related to the bank, and I'm doing tests with all permissions. I've tried to ssh clients and other sql and all right customers, the problem seems to be the connection that visual studio does. Here is an excerpt of my code, how to use the connection string:

using (var con = new MySqlConnection("SERVER=XXX.XXX.XXX.XXX; DATABASE=nomeBancoDeDados; UID=nameUserDataBase; PASSWORD=passwordUserDataBase"))
{
using (var cmd = new MySqlCommand("CommandMySqlHere", con))
{


try
{
con.Open();
}
catch (Exception ex)
{
throw new Exception("Erro de conex√£o: " + ex.Message);
}
using (var leitor = cmd.ExecuteReader())
{

if (leitor.HasRows)
{


while (leitor.Read())
{



}

con.Close();
leitor.Close();




}
else
{
leitor.Close();
con.Close();
MessageBox.Show("Not date result");
}
}
}
}

Options: ReplyQuote


Subject Views Written By Posted
Error: Got packets out of order 1526 Ary Rocha 03/07/2016 02:43PM
Re: Error: Got packets out of order 599 Luis Penunuri 03/29/2016 04:31PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.