• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

SQL Database problem?

activeplay2007

New Member
Joined
Sep 13, 2009
Messages
41
Reaction score
0
Location
Tennessee
Ok, I have searched for three days, non stop, trying to figure this out. I can connect via localhost just fine, but when I try my global IP address I get this message!

Failed connecting to database - MYSQL ERROR: Can't connect to MYSQL server on 'IP' <10060> <2003>
ERROR: Couldn't establish a connection to SQL database!

I am sure I port forwarded correctly, and I have mysql set up as well... I know I am not the only one who has had this problem, can I please get some help?
 
are you trying to connect to a mysql server located on a remote PC? because I dont see why would you use global IP there
 
hes hosting the server on his local pc.
else he dont need to open the ports.
he is using his global ip to connect to his database but he portforwarded his local ip so thats maby why he cant connect

what ip is writen in config.lua at this place
Code:
sqlType = "mysql"
	sqlHost = "localhost"
	sqlPort = 3306
 
btw if you compiled and are using libmysql provided with stian's repack, DNS name resolution is unavailable so you have to use 127.0.0.1 instead of localhost
 
Check compatibility port of mysql your database that you typed in config.lua. By default, it should be 3306, but you could change something by accident.

Regards, Alehopper~~

 
It is like this
-- Database
-- NOTE: sqlFile is used only by sqlite database, and sqlKeepAlive by mysql database.
-- To disable sqlKeepAlive such as mysqlReadTimeout use 0 value.
sqlType = "mysql"
sqlHost = "My Global Ip Goes here"
sqlPort = 3306
sqlUser = "user"
sqlPass = "password"
sqlDatabase = "brigade"
sqlFile = "forgottenserver.s3db"
sqlKeepAlive = 0
mysqlReadTimeout = 10
mysqlWriteTimeout = 10
encryptionType = "sha1"
I see nothing wrong... I have had a server running from this same computer and router before, i wiped the computer, and reset the router, and now it does this? I have no idea why it wont work for me now?
 
remove all your comments in server/config.lua then test

comments like this
-- Database
-- NOTE: sqlFile is used only by sqlite database, and sqlKeepAlive by mysql database.
-- To disable sqlKeepAlive such as mysqlReadTimeout use 0 value.
 
Nope same error... But I did notice that if i use my local host ip address for sql and use the global ip for player connection it goes through... the only problem is that players can get the message that says welcome to my server, but then when they try to go to account manager it says, sorry servers offline!
 
Of course, double dash merely denotes the start of a comment line ending parsing till an EOL is encountered.

Do you have a firewall installed on the host?
Safe to assume you're running Windows and don't have access to a POSIX shell?
Are you running XAMPP, UniServer, WampServer, BitNami WampStack, Zend Server or something Similar?
A lot of these come preconfigured to NOT accept connections except for loopback/:1/127.0.0.1/localhost.
 
Xampp on Windows... The most abysmal situation you could possibly be in.

Anways, examine 'xampp\mysql\bin\my.ini' and look for these two, make sure they are set right:

bind-address=
port=
 
First thing I'd suggest is Uniserver... as it doesn't suck. Even better would be some using a POSIX based host instead, such as a Linux distro like Ubuntu or Debian. But most Windows users are pretty stuck on it. So Uniserver.

Regardless if your platform is Linux or Windows, try to use MariaDB.
 
Back
Top