Error on the word "MySQL"

Discussion in 'Plugin Development' started by BaconStripzMan, Jan 23, 2015.

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

    BaconStripzMan

    Hey guys, so I was about to re-code my hub plugin(Old one was really messy) and I was going to add in a new database system for ranks, tokens, kits etc.
    I just put in the connection stuff for MySQL
    Code:java
    1.  
    2. package me.PizzaNetwork.MainPlugin;
    3.  
    4. import java.sql.Connection;
    5.  
    6. import org.bukkit.event.Listener;
    7. import org.bukkit.plugin.java.JavaPlugin;
    8.  
    9. public class Main extends JavaPlugin implements Listener {
    10.  
    11. MySQL MySQL = new MySQL(this, "host.name", "port", "database", "user", "pass");
    12. Connection c = null;
    13.  
    14. @Override
    15. public void onEnable(){
    16. getLogger().info("PizzaNetwork Hub Enabled!");
    17. c = MySQL.openConnection();
    18. }
    19. }

    And then I get an error on
    Code:java
    1. MySQL <-- MySQL = new MySQL //<---(this bla bla

    and
    Code:java
    1. c = MySQL <---.openC

    Help pls!
     
  2. Offline

    Skionz

    @BaconStripzMan What is a 'MySQL?' I am pretty sure that is not a built in class.
     
  3. Offline

    BaconStripzMan

    im just gonna facepalm... MySQL is the most popular open-source database system
     
  4. Offline

    uksspy

    Yes, but I don't see any imports for a MySQL class.
     
  5. Offline

    BaconStripzMan

    I know but I use to use it.

    EDIT: So idk why it works
     
  6. Offline

    CraftCreeper6

    @BaconStripzMan
    Your instance... MySQL MySQL
    Why do you double-up? MySQL mySQL, do you even Java Naming Conventions?
     
  7. Offline

    Hawktasard

    @BaconStripzMan
    I don't think that's what he means, he probably wants to see what's inside that class
     
  8. Offline

    BaconStripzMan

    Thats the class :p
    I'll change it :p
     
  9. Offline

    WesJD

    Inputting actual database info into the constructor would be nice.
     
  10. Offline

    BaconStripzMan

    1. I wouldn't show it to you so..
    2. That's not the error, I get an error on the word MySQL

    Sorry! I forgot to install the API by @-_Husky_- facepalm

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 13, 2016
Thread Status:
Not open for further replies.

Share This Page