Page 1 of 1

MySQL connection on a mac

Posted: 22 May 2010, 16:03
by Thunder
Hi all,
I am now using a mac. I am trying to get MySQL working with SFS. I have copied mysql-connector-java-5.1.12-bin to my Library/Java/Extensions folder. Below is my config file:

Code: Select all

<DatabaseManager active="true">
	<Driver>org.gjt.mm.mysql.Driver</Driver>
	<ConnectionString>jdbc:mysql://localhost:3306/flash</ConnectionString>
	<TestSQL><![CDATA[SELECT COUNT(*) FROM player]]></TestSQL>
	<UserName>root</UserName>
	<Password>PASSWORD</Password>
	<MaxActive>100</MaxActive>
	<MaxIdle>10</MaxIdle>
	<OnExhaustedPool>fail</OnExhaustedPool>
	<BlockTime>5000</BlockTime>
</DatabaseManager>
The error I get is:
17:26:03.545 - [ SEVERE ] > DbManager could not retrive a connection. 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.
it.gotoandplay.smartfoxserver.exceptions.DbManagerException: The Test SQL statement failed! Please check your configuration.
at it.gotoandplay.smartfoxserver.SmartFoxServer.setupZone(SmartFoxServer.java:1843)
at it.gotoandplay.smartfoxserver.lib.ConfigReader.parse_Zones(ConfigReader.java:806)
at it.gotoandplay.smartfoxserver.lib.ConfigReader.readZoneConfig(ConfigReader.java:174)
at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket(SmartFoxServer.java:339)
at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:607)
Problems in config file: The Test SQL statement failed! Please check your configuration.
it.gotoandplay.smartfoxserver.exceptions.ConfigurationException: The Test SQL statement failed! Please check your configuration.
at it.gotoandplay.smartfoxserver.lib.ConfigReader.readZoneConfig(ConfigReader.java:199)
at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket(SmartFoxServer.java:339)
at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:607)

Errors found in configuration files.
Unable to start the server.


Shutting down server...
Any ideas? I am certain my Test SQL statement is correct

Cheers all

Posted: 25 May 2010, 08:38
by Lapo
Hey there,
we had some other users reporting a similar problem and they solved it from the MySQL side.
http://forums.smartfoxserver.com/viewtopic.php?t=7380