Připojení k MySQL serveru nefunguje

Od: Datum: 22.06.14 14:10 odpovědí: 6 změna: 22.06.14 23:03

Ahoj

Obracím se na vás s pro mne zapeklitou otázkou třeba to někdo bude vědět hned.
Na domácí síti mám linuxový server s nainstalovaným LAMP. Na domácí síti mám také stolní počítač s Minecraft serverem.
Když na linuxovém serveru nastavuj wordpress tak databáze je v pořádku ale když na stlním počítači zapnu Minecraft Server s pluginy které mohou využívat MySQL a já bych chtěl aby používaly MySQL tak mi prostě nejdou ...
Jelikož je Minecraft v Javě tak jsem na server také nainstaloval Javu ale to asi taky nepomohlo.
Pluginy které bych chtěl spojit s MySQL jsou: LogBlock, xAuth, CCLogger

CCLogger měl ještě požadavek na SQLibary
[13:24:19 INFO]: [CCLogger] Enabling CCLogger v3.3.3
[13:24:19 INFO]: [CCLogger] SQLibrary is missing from your plugins. It is required for database use! Please install SQLibrary!
Po dodání SQLibary se v databái také nic nezměnilo

Výpis z konzole při startu LogBlock:

[13:57:00 INFO]: [LogBlock] Loading LogBlock v1.80
[13:57:00 INFO]: [LogBlock] Connecting to ulogblock@jdbc:mysql://192.168.3.202:3
306/logblock?useUnicode=true&characterEncoding=utf-8...
[13:57:01 ERROR]: [LogBlock] Error while fetching connection:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driv
er has not received any packets from the server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.7.0_55]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.7.0_55]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.7.0_55]
at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.7.0_55]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:407) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at com.mysql.jdbc.MysqlIO.(MysqlIO.java:343) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2334) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2371) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2163) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:794) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.7.0_55]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.7.0_55]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.7.0_55]
at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.7.0_55]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:407) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:378) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at java.sql.DriverManager.getConnection(Unknown Source) ~[?:1.7.0_55]
at java.sql.DriverManager.getConnection(Unknown Source) ~[?:1.7.0_55]
at de.diddiz.util.MySQLConnectionPool.getConnection(MySQLConnectionPool.java:72) ~[LogBlock.jar:?]
at de.diddiz.LogBlock.LogBlock.getConnection(LogBlock.java:245) [LogBlock.jar:?]
at de.diddiz.LogBlock.LogBlock.onLoad(LogBlock.java:84) [LogBlock.jar:?]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.loadPlugins(CraftServer.java:360) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.(CraftServer.java:317) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at net.minecraft.server.v1_7_R3.PlayerList.(PlayerList.java:68) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at net.minecraft.server.v1_7_R3.DedicatedPlayerList.(SourceFile:14) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at net.minecraft.server.v1_7_R3.DedicatedServer.init(DedicatedServer.java:126) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:436) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method) ~[?:1.7.0_55]
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) ~[?:1.7.0_55]
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) ~[?:1.7.0_55]
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) ~[?:1.7.0_55]
at java.net.AbstractPlainSocketImpl.connect(Unknown Source) ~[?:1.7.0_55]
at java.net.PlainSocketImpl.connect(Unknown Source) ~[?:1.7.0_55]
at java.net.SocksSocketImpl.connect(Unknown Source) ~[?:1.7.0_55]
at java.net.Socket.connect(Unknown Source) ~[?:1.7.0_55]
at java.net.Socket.connect(Unknown Source) ~[?:1.7.0_55]
at java.net.Socket.(Unknown Source) ~[?:1.7.0_55]
at java.net.Socket.(Unknown Source) ~[?:1.7.0_55]
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:254) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at com.mysql.jdbc.MysqlIO.(MysqlIO.java:292) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
... 24 more

Když startuje CCLogger:

[13:57:02 INFO]: [CCLogger] Enabling CCLogger v3.3.3
[13:57:03 ERROR]: [CCLogger] CCLogger[MySQL] Could not establish a MySQL connection, SQLException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
[13:57:03 INFO]: [CCLogger] MySQL successfully connected!
[13:57:03 ERROR]: Error occurred while enabling CCLogger v3.3.3 (Is it up to date?)
java.lang.NullPointerException
at lib.PatPeter.SQLibrary.MySQL.isTable(MySQL.java:193) ~[?:?]
at me.alrik94.plugins.cclogger.Database.mysqlTableCheck(Database.java:83) ~[?:?]
at me.alrik94.plugins.cclogger.CCLogger.onEnable(CCLogger.java:94) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:324) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:404) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.loadPlugin(CraftServer.java:446) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.enablePlugins(CraftServer.java:380) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at net.minecraft.server.v1_7_R3.MinecraftServer.n(MinecraftServer.java:352) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at net.minecraft.server.v1_7_R3.MinecraftServer.g(MinecraftServer.java:326) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at net.minecraft.server.v1_7_R3.MinecraftServer.a(MinecraftServer.java:282) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at net.minecraft.server.v1_7_R3.DedicatedServer.init(DedicatedServer.java:182) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:436) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]

Při startu xAuth:

[13:57:08 INFO]: [xAuth] Enabling xAuth v2.4.4
[13:57:08 INFO]: [xAuth] PermissionAlias backend: pex registered!
[13:57:08 INFO]: [xAuth] PermissionAlias backend: gm registered!
[13:57:08 INFO]: [xAuth] PermissionAlias backend: ukkit registered!
[13:57:08 INFO]: [xAuth] Attempting to use supported permissions plugin GroupManager
[13:57:08 WARN]: [xAuth] This plugin is not ready yet.
[13:57:08 INFO]: [xAuth] Initializing bukkit backend
[13:57:08 INFO]: [xAuth] Attempting to use supported permissions plugin PermissionsEx
[13:57:08 WARN]: [xAuth] This plugin is not ready yet.
[13:57:08 INFO]: [xAuth] Initializing bukkit backend
[13:57:08 INFO]: [xAuth] Attempting to use supported permissions plugin Bukkit
[13:57:08 WARN]: [xAuth] This plugin is not ready yet.
[13:57:08 INFO]: [xAuth] Initializing bukkit backend
[13:57:08 INFO]: [xAuth] Config node permissions.backend changed to ukkit
[13:57:08 INFO]: [xAuth] Initializing bukkit backend
[13:57:08 INFO]: [xAuth] Attached to Bukkit
[13:57:09 ERROR]: [xAuth] An error occured during the version check process. Please check version format
[13:57:09 ERROR]: [xAuth] Failed to borrow MySQL connection from pool!
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.7.0_55]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.7.0_55]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.7.0_55]
at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.7.0_55]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:407) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at com.mysql.jdbc.MysqlIO.(MysqlIO.java:343) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2334) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2371) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2163) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:794) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.7.0_55]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.7.0_55]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.7.0_55]
at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.7.0_55]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:407) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:378) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at java.sql.DriverManager.getConnection(Unknown Source) ~[?:1.7.0_55]
at java.sql.DriverManager.getConnection(Unknown Source) ~[?:1.7.0_55]
at de.luricos.bukkit.xAuth.database.ConnectionPool.leaseConn(ConnectionPool.java:62) ~[xAuth.jar:?]
at de.luricos.bukkit.xAuth.database.DatabaseController.getConnection(DatabaseController.java:105) [xAuth.jar:?]
at de.luricos.bukkit.xAuth.database.DatabaseController.isConnectable(DatabaseController.java:94) [xAuth.jar:?]
at de.luricos.bukkit.xAuth.xAuth.onEnable(xAuth.java:156) [xAuth.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:324) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:404) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.loadPlugin(CraftServer.java:446) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.enablePlugins(CraftServer.java:380) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at net.minecraft.server.v1_7_R3.MinecraftServer.n(MinecraftServer.java:352) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at net.minecraft.server.v1_7_R3.MinecraftServer.g(MinecraftServer.java:326) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at net.minecraft.server.v1_7_R3.MinecraftServer.a(MinecraftServer.java:282) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at net.minecraft.server.v1_7_R3.DedicatedServer.init(DedicatedServer.java:182) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:436) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method) ~[?:1.7.0_55]
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) ~[?:1.7.0_55]
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) ~[?:1.7.0_55]
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) ~[?:1.7.0_55]
at java.net.AbstractPlainSocketImpl.connect(Unknown Source) ~[?:1.7.0_55]
at java.net.PlainSocketImpl.connect(Unknown Source) ~[?:1.7.0_55]
at java.net.SocksSocketImpl.connect(Unknown Source) ~[?:1.7.0_55]
at java.net.Socket.connect(Unknown Source) ~[?:1.7.0_55]
at java.net.Socket.connect(Unknown Source) ~[?:1.7.0_55]
at java.net.Socket.(Unknown Source) ~[?:1.7.0_55]
at java.net.Socket.(Unknown Source) ~[?:1.7.0_55]
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:254) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
at com.mysql.jdbc.MysqlIO.(MysqlIO.java:292) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
... 29 more
[13:57:09 ERROR]: [xAuth] Failed to establish MySQL database connection!
[13:57:09 INFO]: [xAuth] Disabling xAuth v2.4.4
[13:57:09 INFO]: [xAuth] Detached from BukkitSupport
[13:57:09 INFO]: [xAuth] Attached to Bukkit
[13:57:09 INFO]: [xAuth] v2.4.4 Disabled!

doplněno 22.06.14 14:39:

dokonce jsem zkusil i návod podle tohoto http://ubuntuforums.org/archive/index.php/t-1869412.html


Seznam odpovědí:
 
moment čekejte prosím, probíhá přenos dat...
Zobrazení struktury odpovědí v otázce
Skrytí struktury odpovědí v otázce
Zobrazení struktury odpovědí v otázce

 

Odpovědi na otázku:
Datum: 22.06.14 14:25
avatar

"Caused by: java.net.ConnectException: Connection refused: connect"

Dá se k db na serveru z druhého počítače připojit (mimo minecraftu), nebo vůbec ne?

Ohodnoceno: 2x
 
Datum: 22.06.14 14:41

Jak to ověřím? nějaký program? :)

doplněno 22.06.14 14:45:

zkusím toto https://webtrh.cz/180064-test-pripojeni-databazi

doplněno 22.06.14 15:09:

když to zkusím takhle tak strácka zůstane prázdná

Datum: 22.06.14 20:23
avatar

Telnet na tu ip a port, případně kouknout do logu mysql serveru, co tam je za důvod odmítnutí. Na firewallu to povolené je, connection string je správně?

Připojení můžete zkoušet i přes nějakého správce db, neplacený nejspíš Workbench.

Ohodnoceno: 2x
 
Datum: 22.06.14 23:03

yup workbench mám :)
nakonec mi pomohlo tohle
https://rtcamp.com/tutorials/mysql/remote-access/

obyčejné nastavení vzdáleného přstupu

Datum: 22.06.14 16:03

řekněme že asi ne .. co s tím?

Datum: 22.06.14 20:18

mám problém i s připojením pomocí MySQL Workbench

 

 

 

 

Přihlásit se k odběru odpovědí z této otázky:

Neneseme odpovědnost za správnost informací a za škodu vzniklou jejich využitím. Jednotlivé odpovědi vyjadřují názory jejich autorů a nemusí se shodovat s názorem provozovatele poradny Poradte.cz

 
Copyright © 2004-2016 Poradna Poradte.cz. Všechna práva na poradně Poradte.cz vyhrazena.