Unable to connect to Database #251


Open
  • BLiTz_BaNe created this issue Feb 16, 2021
    Hi, I'm having issues when connecting to Database. I have bungeecord enabled and other servers are able to connect to Database successfully. They also have the same config so that means to say, same Credentials when logging in into the database. However, for some reason, there are 3 servers who can't access the database. The 3 database is on 1.16 which can easily be connected to database. However, there are 3 servers who can't two of them is on 1.16 and the last one is on 1.12 which is the exact error that I have below. They do all have the same config so that means, they all share the same credentials. But when checking on other plugins, they can easily connect to the database with ease. May I know how to fix this issue ?


    [MyCommand]: Enabling MyCommand v5.6.9
    *-=-=-=-=-=-=-=-=-=-* MyCommand *-=-=-=-=-=-=-=-=-=-=-*
    | You're using an not fully supported server version. (v1_12_R1)
    | Vault : Ok. Hooked on Vault 1.7.3-b131
    | Command file(s) found : 14
    | Config : Ready.
    | ProtocolLib found, features enabled (SignMenu)
    [MyCmd]: RIGHT_CLICK_INTERACTION Block set item is null, check config.yml
    [MyCmd]: RIGHT_CLICK_INTERACTION Block set item is null, check config.yml
    [MyCmd]: RIGHT_CLICK_INTERACTION Block set item is null, check config.yml
    [MyCmd]: RIGHT_CLICK_INTERACTION Block set item is null, check config.yml
    [MyCmd]: PHYSICAL_INTERACTION Block set item is null, check config.yml
    [MyCmd]: PHYSICAL_INTERACTION Block set item is null, check config.yml
    [MyCmd]: PHYSICAL_INTERACTION Block set item is null, check config.yml
    [PlaceholderAPI]: Successfully registered expansion: mycommand
    | PlaceholderAPI: Hooked, Ok.
    | Duplicated command found. block_pl in donttourch.yml
    | Custom commands loaded : 54
    | Version: 5.6.9
    | Author : emmerrei a.k.a Ivanpro
    | You are running the latest version of MyCommand.
    | Using MySQL for PlayerData storage.
    | Connecting to database (MySQL) ...
     
    [MyCmd]: Error while fetching MySQL connection!
    Could not create connection to database server. Attempted reconnect 3 times. Giving up.
    [MyCmd]: An error occurred while performing a query. (NullPointerException)
    [MyCmd]: An error occurred while performing a query. (NullPointerException)
    *-=-=-=-=-=-=-=-=-=-* Done! *-=-=-=-=-=-=-=-=-=-=-*


    Thank you.

  • BLiTz_BaNe posted a comment Feb 18, 2021

    In addition for that, may I also know the JDBC version of the SQL Connector that you're using? Thank you.

  • ivanfromitaly posted a comment Feb 20, 2021

    What it says the error?

  • BLiTz_BaNe posted a comment Feb 20, 2021

    This is the error: 

    [MyCmd]: Error while fetching MySQL connection!
    Could not create connection to database server. Attempted reconnect 3 times. Giving up.
    [MyCmd]: An error occurred while performing a query. (NullPointerException)
    [MyCmd]: An error occurred while performing a query. (NullPointerException)
    *-=-=-=-=-=-=-=-=-=-* Done! *-=-=-=-=-=-=-=-=-=-=-*

     

    From the commands, there are no error message. It says 0 since it's not linked to Database. 

  • BLiTz_BaNe posted a comment Feb 20, 2021

    By the way, do you have a Discord account or a Discord channel? It would be easier for all of us to make a Discord Channel instead so we can help each other if you are temporary not available. 

  • ivanfromitaly posted a comment Feb 23, 2021

    No i don't have a discord channel. And i don't know if it's the case to open one. Opening a discord, it's just a weight more i have to support in a, afterall free plugin. Not like you have to open it also in a paid plugin, but in that case people will appreciate. Most of the time, when people ask me stuff is basically i have to do the command for them, so it's not the case. Certain other user would for sure feel entitled to some sort of support ecc ecc. It's not a complete no, maybe in future.

     

    About your problem, i guess it's a problem of the old version of spigot/paper who has older driver for the mysql you're using. Inside my Connectore class, i just import "com.mysql.jdbc.Driver", that's it. The plugin is compiled with Java 1.8 (8) so i sincerely don't know that version is using.


To post a comment, please login or register a new account.