Server rentals :: NFOservers.com

Forums

All times are UTC - 8 hours



Author Message
PostPosted: Sat Apr 09, 2011 8:18 am 
Offline
A regular
A regular

Joined: Tue Feb 22, 2011 9:32 am
Posts: 31
I have a minecraft server that is running Recommended Build #617 of CraftBukkit. We have a ton of plugins installed already, but there are a few more that I need to add to wrap everything up. These three (iConomy, BigBrother, and NetStats) all require a database, with two of the three requiring MySQL. Well, I have MySQL set up on the server and running just fine, as I've gotten phpBB running without difficulty, however, each and everytime I start the server, I get the following bit in my error log.

Code:
2011-04-09 05:01:29 [INFO] [iConomy] Could not create connection: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Last packet sent to the server was 0 ms ago.
2011-04-09 05:01:29 [INFO] [iConomy] Could not load transaction logger:
2011-04-09 05:01:29 [SEVERE] java.lang.NullPointerException
2011-04-09 05:01:29 [SEVERE]    at com.nijiko.coelho.iConomy.system.Transactions.load(Transactions.java:31)
2011-04-09 05:01:29 [SEVERE]    at com.nijiko.coelho.iConomy.iConomy.onEnable(iConomy.java:138)
2011-04-09 05:01:29 [SEVERE]    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
2011-04-09 05:01:29 [SEVERE]    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:514)
2011-04-09 05:01:29 [SEVERE]    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:216)
2011-04-09 05:01:29 [SEVERE]    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:94)
2011-04-09 05:01:29 [SEVERE]    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:72)
2011-04-09 05:01:30 [SEVERE]    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:215)
2011-04-09 05:01:30 [SEVERE]    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:202)
2011-04-09 05:01:30 [SEVERE]    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:142)
2011-04-09 05:01:30 [SEVERE]    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:257)
2011-04-09 05:01:30 [SEVERE]    at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
2011-04-09 05:01:30 [INFO] [iConomy] Could not create connection: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Last packet sent to the server was 0 ms ago.
2011-04-09 05:01:30 [INFO] [iConomy] Failed to load database: java.lang.NullPointerException
2011-04-09 05:01:30 [INFO] [iConomy] Plugin disabled.


All three use a java-mysql connector, and I've ensured that it's been downloaded and placed in the correct folder. I've also created a "minecraft" mysql user and made a "minecraft" database. I got the following YAML from phpMyAdmin.
Code:
%YAML 1.1
---
# mysql.user
-
  Host: "localhost"
  User: "minecraft"
  Password: "BLANKED FOR SECURITY"
  Select_priv: "N"
  Insert_priv: "N"
  Update_priv: "N"
  Delete_priv: "N"
  Create_priv: "N"
  Drop_priv: "N"
  Reload_priv: "N"
  Shutdown_priv: "N"
  Process_priv: "N"
  File_priv: "N"
  Grant_priv: "N"
  References_priv: "N"
  Index_priv: "N"
  Alter_priv: "N"
  Show_db_priv: "N"
  Super_priv: "N"
  Create_tmp_table_priv: "N"
  Lock_tables_priv: "N"
  Execute_priv: "N"
  Repl_slave_priv: "N"
  Repl_client_priv: "N"
  Create_view_priv: "N"
  Show_view_priv: "N"
  Create_routine_priv: "N"
  Alter_routine_priv: "N"
  Create_user_priv: "N"
  Event_priv: "N"
  Trigger_priv: "N"
  ssl_type: ""
  ssl_cipher: ""
  x509_issuer: ""
  x509_subject: ""
  max_questions: 0
  max_updates: 0
  max_connections: 0
  max_user_connections: 0


I can plainly see that my three newly created users don't have privs, even though I did a
Code:
GRANT ALL PRIVILEGES ON minecraft.* TO "minecraft"@"localhost";

So what did I do wrong? This is the only thing I can think of.


Top
 Profile  
 
PostPosted: Sat Apr 09, 2011 8:20 am 
Offline
A regular
A regular

Joined: Tue Feb 22, 2011 9:32 am
Posts: 31
Also, this.
Code:
# Netstats Error Log
CraftBukkit Version: git-Bukkit-0.0.0-612-g4c7a9e7-b617jnks (MC: 1.4)
Netstats Version: b3.9.1
MySQL Error: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Last packet sent to the server was 0 ms ago.
Offending Statement: UPDATE netstats SET logged=0


Top
 Profile  
 
PostPosted: Sat Apr 09, 2011 9:54 am 
Offline
Founder
Founder
User avatar

Joined: Thu Apr 18, 2002 11:04 pm
Posts: 9234
Location: Seattle
Global privileges are separate from individual database privileges. Your command would give the "minecraft" user full database privileges.

Did you also define a password for the "minecraft" user, with a separate command? Are you able to connect and administer its database using phpMyAdmin and that login and password?

Beyond that, I am not sure what to try, as I'm just not familiar with using MySQL from Java.


Top
 Profile  
 
PostPosted: Sat Apr 09, 2011 10:03 am 
Offline
A regular
A regular

Joined: Tue Feb 22, 2011 9:32 am
Posts: 31
I just logged in (for the third time) with the "minecraft" username and noticed that it says "Create new database: NO PRIVILEGES". What the hell? I thought I gave it privs. What do I need to do to fix this?


Top
 Profile  
 
PostPosted: Sat Apr 09, 2011 10:08 am 
Offline
Founder
Founder
User avatar

Joined: Thu Apr 18, 2002 11:04 pm
Posts: 9234
Location: Seattle
As I mentioned, a user can have individual database privileges, or global privileges, or a mix. You gave your user all privileges on a particular database, so "minecraft" can add tables, update tables, etc, all within that database. Creating a new database is, by contrast, a global privilege. You did not grant your user that ability, and it shouldn't need it.


Top
 Profile  
 
PostPosted: Sat Apr 09, 2011 10:10 am 
Offline
A regular
A regular

Joined: Tue Feb 22, 2011 9:32 am
Posts: 31
Right. That makes sense. I think the big, scary red text just got my blood boiling, cause that should have been obvious. I just tried adding a table, and it worked. :\

Are there any queries that I can try in the MySQL CLI client that could simulate what the plugins are trying to do? Perhaps narrow down the possible cause?


Top
 Profile  
 
PostPosted: Sat Apr 09, 2011 10:12 am 
Offline
Founder
Founder
User avatar

Joined: Thu Apr 18, 2002 11:04 pm
Posts: 9234
Location: Seattle
It's difficult to say, as that error isn't giving us any real information. Presumably "communications failure" could mean many things.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
It is currently Wed May 22, 2013 7:41 am
Powered by phpBB® Forum Software © phpBB Group