• 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!

ERROR: Couldn't estabilish connection to SQL database!

Miricx

New Member
Joined
Aug 6, 2010
Messages
7
Reaction score
0
FYI: I've played tibia since 2001 and have hosted many XML servers (I stopped play Tibia right after SQL became mainstream), so this is basically the first time I'm opening a SQL server.

I keep getting this error all the time I'm trying to run my Forgotten Server 8.60 server.
Code:
[23/10/2012 17:55:05] Failed connecting to database - MYSQL ERROR: Can't connect to MySQL server on 'localhost' (10061) (2003)

[23/10/2012 17:55:05] > ERROR: Couldn't estabilish connection to SQL database!

This is how my Config.lua looks like
Code:
	-- 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 = "localhost"
	sqlPort = 3306
	sqlUser = "root"
	sqlPass = "MYPASS"
	sqlDatabase = "MYDATABASE"
	sqlFile = "schemas/mysql.sql"
	sqlKeepAlive = 0
	mysqlReadTimeout = 10
	mysqlWriteTimeout = 10
	encryptionType = "sha1"
 
If you followed the tutorial, then your sqlUser should be the same as sqlDatabase.
So, it would be something like this:
LUA:
	-- 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 = "localhost"
	sqlPort = 3306
	sqlUser = "MYDATABASE"
	sqlPass = "MYPASS"
	sqlDatabase = "MYDATABASE"
	sqlFile = "schemas/mysql.sql"
	sqlKeepAlive = 0
	mysqlReadTimeout = 10
	mysqlWriteTimeout = 10
	encryptionType = "sha1"
 
Back
Top