Cannot use Table Wizard with MySQL

I am running LO 7.2 on Windows 10 and have a database on a remote MySQL server. I have the database connected using the “autoReconnect=true” flag. Using Design view, I can create tables in the database and have full access to it. But using the Table wizard, I get the “wait_timeout” error message and the action fails.

  • You could connect to MySQL in different ways. There is a direct connection, JDBC and ODBC available. Seems you are using JDBC when adding the parameter for autoReconnect. If you need the table wizard test it with other connections.

  • You are using a server database. Think you won’t use only one table with the predefined fields of the table wizard. I would prefer to create tables by design view.

  • Try to set the timeout for the server. Go to Tools → SQL in the main window of Base. Start SET SESSION wait_timeout=600;
    This will set the timeout from (normally) 30 seconds to 600 seconds.

  • You aren’t allowed to change the wait-timeout? Some servers won’t allow this. So a macro will help. It will send a little query every 30 seconds and the connection will be established.

GLOBAL boStop AS BOOLEAN

SUB Reconnect
DIM oDatasource AS OBJECT
DIM oConnection AS OBJECT
DIM oSQL_Command AS OBJECT
boStop = false
DO
WAIT 30000 'Zeitangabe in Millisekunden
oDatasource = thisDatabaseDocument.CurrentController
oConnection = oDatasource.ActiveConnection()
oSQL_Command = oConnection.createStatement()
oSQL_Command.executeQuery(“SELECT NOW()”)
LOOP WHILE boStop = false
END SUB

SUB StopConnect
boStop = true
END SUB

You have to connect to the database when opening the *.odb-file. The macro will be started when opening the database file and will send the first query after 30 seconds.