MySQL connect with my plugin

Discussion in 'Plugin Development' started by MrFiliper, Jan 19, 2016.

Thread Status:
Not open for further replies.
  1. Offline


    Hello, I search in google mysql connection tutorials, but not working. Please help my, send my link to working MySQL connect or create small code.

  2. Offline

    timtower Administrator Administrator Moderator

  3. Offline


    Nonono, we are not here to spoonfeed you, we are only gonna help you. But in the end, you need to write it yourself.

    to 1min.
  4. Offline



    I'd like to add something. After some idle time, (28800s by default) the server will automatically kill the connection. So you will have to check if the connection is still alive before any of your queries (including prepared statements)
                if (connection == null || !connection.isValid(4) || connection.isClosed())
                    connect();//Reinstanciating your Connection object
    If you're wondering what is "4", take a look at the doc!
Thread Status:
Not open for further replies.

Share This Page