Import to MySQL Database error

Import to MySQL Database error

avatar

I'm trying to import an .rdm file (created with an export) from a dataSource, to another Datasource (MySQL).
In the middle of import (60%) I have this error:


MySql.Data.MySqlClient.MySqlException (0x80004005): Packets larger than max_allowed_packet are not allowed.
at MySql.Data.MySqlClient.MySqlStream.SendPacket(MySqlPacket packet)
at MySql.Data.MySqlClient.NativeDriver.ExecutePacket(MySqlPacket packetToExecute)
at MySql.Data.MySqlClient.NativeDriver.SendQuery(MySqlPacket queryPacket)
at MySql.Data.MySqlClient.Driver.SendQuery(MySqlPacket p)
at MySql.Data.MySqlClient.Statement.ExecuteNext()
at MySql.Data.MySqlClient.PreparableStatement.Execute()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
at Devolutions.RemoteDesktopManager.Business.DataSources.DatabaseConnectionDataSource.ExecuteNonQuery(String sql, IDbTransaction dbTransaction, IDbDataParameter[] parameters, Int32 commandTimeout)
at Devolutions.RemoteDesktopManager.Business.DataSources.DatabaseConnectionDataSource.InsertConnection(Connection connection, IDbTransaction dbTransaction, ISecurityProvider provider, Nullable`1 repositoryID)
at Devolutions.RemoteDesktopManager.Business.DataSources.DatabaseConnectionDataSource.SaveConnections(IEnumerable`1 connections, IDbTransaction dbTransaction, ISecurityProvider provider, Nullable`1 repositoryID)
at Devolutions.RemoteDesktopManager.Business.DataSources.DatabaseConnectionDataSource.SaveConnection(Connection connection)




After I have confirmed the error, the import process goes on and finish, but I'm quite sure that some session was not imported, but I do not know which one.
HOw can avoid this kind of error?
Is there a MySQL parameter to tune in order to solve it?
REgards
P.

All Comments (1)

avatar

Your best bet is to increase value of max_allowed_packet of your MySQL/MariaDB instance.

Have a look here:

https://dev.mysql.com/doc/refman/5.5/en/packet-too-large.html
or
https://stackoverflow.com/questions/8062496/how-to-change-max-allowed-packet-size/35184600

Stéfane Lavergne