I use this method to increase value of logins column by one:
MySqlConnection connect = new MySqlConnection(connectionStringMySql);
MySqlCommand cmd = new MySqlCommand();
cmd.Connection = connect;
cmd.Connection.Open();
string commandLine = null;
commandLine = "UPDATE Users SET logins = (@cur_value := logins) + 1 WHERE id = @id;";
cmd.CommandText = commandLine;
cmd.Parameters.AddWithValue("@id", userId);
cmd.ExecuteNonQuery();
cmd.Connection.Close();
And i get this Exception:
See Question&Answers more detail:osFatal error encountered during command execution.