MySQL lost connection

Discussion in 'Spigot Plugin Help' started by Nawaf, Jul 6, 2018.

  1. Hello, my plugin is connecting database with this method 'onEnable()' but losing the mysql connection after 5 minutes if not data send/recieve. How can I fix that?

    I'm already using ?autoReconnect=true
     
  2. Use a connection pool.
     
  3. More details please?
     
  4. You can use a buklitrunnable making a simple async query every 4 minutes, for example counting the number of databases.

    There is a string that you add when you connect to mysql, but it don't always work.