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

Couldn't establish connection to SQL Database!

Reaper7

dunno wat 2 rite here
Joined
Feb 18, 2011
Messages
133
Reaction score
1
hi!
im testing the tfs for tibia 8.54 (cryingdamson6pl1-gui) but ive got a problem.
ive made my database, ive done everything in config.lua and for some reason it doesnt want to work:(

i run my console with xampp turned on... after a while it says "Starting SQL Connection". it loads for about 3 minutes and then i receive an error which says "Couldn't establish connection to SQL Database!". in the console it also says:
Code:
Failed connecting to database - MYSQL ERROR: Can't connect to MySQL server on 'localhost' (10061) (2003)
unfortunately, i dont know what to do. can someone please help me?
that is how my config.lua looks like:
PHP:
-- 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 = "mysexypassword"
	sqlDatabase = "testowyots" -- in polish, some of you may not understand it
	sqlFile = "forgottenserver.s3db"
	sqlKeepAlive = 0
	mysqlReadTimeout = 10
	mysqlWriteTimeout = 10
	encryptionType = "plain"

hope someone will help me :)
 
First of all: Bumping is not allowed within 24 hours of last post.
Second of all: encryptionType should be sha1.
And lastly: make sure MySQL is running properly without any errors.

Also idk if it's important but try setting sqlFile to "schemas/mysql.sql".
 
Please do not bump your thread within 24 hours of your last post. Next time I'll have to assign you an infraction. Thank you.

And as for the error - make sure that your MySQL is up and running, just like Korrex stated in his post. If it is indeed running, try substituting 'localhost' with '127.0.0.1' in your config.lua file.
 
Still doesn't work. That's how my config.lua looks like by now:
PHP:
-- 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 = "127.0.0.1"
	sqlPort = 3306
	sqlUser = "root"
	sqlPass = "mypassword"
	sqlDatabase = "testowyots"
	sqlFile = "schemas/mysql.sql"
	sqlKeepAlive = 0
	mysqlReadTimeout = 10
	mysqlWriteTimeout = 10
	encryptionType = "sha1"
 
hi!
im testing the tfs for tibia 8.54 (cryingdamson6pl1-gui) but ive got a problem.
ive made my database, ive done everything in config.lua and for some reason it doesnt want to work:(

i run my console with xampp turned on... after a while it says "Starting SQL Connection". it loads for about 3 minutes and then i receive an error which says "Couldn't establish connection to SQL Database!". in the console it also says:
Code:
Failed connecting to database - MYSQL ERROR: Can't connect to MySQL server on 'localhost' (10061) (2003)
unfortunately, i dont know what to do. can someone please help me?
that is how my config.lua looks like:
PHP:
-- 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 = "mysexypassword"
	sqlDatabase = "testowyots" -- in polish, some of you may not understand it
	sqlFile = "forgottenserver.s3db"
	sqlKeepAlive = 0
	mysqlReadTimeout = 10
	mysqlWriteTimeout = 10
	encryptionType = "plain"

hope someone will help me :)
Use this! IF it does not work, your mysql isn't working properly.
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 = "127.0.0.1"
	sqlPort = 3306
	sqlUser = "root"
	sqlPass = "mysexypassword"
	sqlDatabase = "testowyots" -- in polish, some of you may not understand it
	sqlFile = "forgottenserver.s3db"
	sqlKeepAlive = 0
	mysqlReadTimeout = 10
	mysqlWriteTimeout = 10
	encryptionType = "plain"
:peace:
 
Last edited:
how'd you make the port 3306 free to use? my xampp is working correctly ...
you can see it at the screen shot below:
117a7px.png
 
Actually, I had a website on my localhost... It was few months ago, but then i couldn't be bother to continue it, so I just removed xampp from my computer and then installed again.
 
Actually, I had a website on my localhost... It was few months ago, but then i couldn't be bother to continue it, so I just removed xampp from my computer and then installed again.

Alright, but FYI, it's always better to use UniServer in a Windows environment.
 
Okay, so I just uninstall xamp and download UniServer?
Anyway, guys, thankyou for help, I know that you've got some better stuff to do. :)
 
Ehh, UniServer doesn't work either. I've got some viruses, probably. Well, the best thing to do, is just give up, I can't be bother to do it - to much nerves. Thanks guys for your help, it was really kind.
 

Similar threads

Back
Top