1.16.1 Cannot connect to database

Discussion in 'Spigot Plugin Development' started by nerkt, Aug 2, 2020 at 1:17 AM.

  1. So i tried to connect to my database with the plugin MySQL Inventory Bridge but when i try to connect i have an error that says
    Code (Text):

    [02:10:56 ERROR]: [MysqlInventoryBridge] Error re-connecting to the database! Error: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
    [02:10:56 ERROR]: [MysqlInventoryBridge] Could not reconnect to Database! Error: null
    [02:10:56 WARN]: [MysqlInventoryBridge] Connection failed. Reconnecting...
    [02:10:56 INFO]: [MysqlInventoryBridge] Attempting to establish a connection to the MySQL server!
     
    My Database is on a dedicated machine on which I have pterodactyl installed. I manage to connect to mysql with its credentials from the console but the plugins cannot connect. There is the config of the plugin.
    https://hasteb.in/xazakori.yaml
     
  2. Also all permissions are granted, mysql is enable and i can acces it with command
     
  3. More than likely it is because you didn't specify the correct username, password, or schema when creating the Connection instance.
     
  4. I specified correctly. The problem is that it doesn't work with any plugin. In addition I tried to connect with the same identifiers with the commands on the console and it worked
     
  5. Perhaps you aren't reading it from the config correctly. Can you paste your code retrieving it form the config?
     
  6. This is the wrong section, this section is for development of plugins.
     
  7. I changed my config to this https://hasteb.in/ujapesif.yaml and this is when i try to connect to mysql with the same the same identifiers
     

    Attached Files:

  8. This is for coding plugins, not for configuring plugins.
    Also, you put your db password on the internet, you should definitely change it.
     
  9. Make sure all the defined credentials are correct. Also check for case sensitive strings.