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

Solved MYSQL ERROR: Can't connect to MySQL server on 'localhost' --please help!

kird

New Member
Joined
Jul 3, 2010
Messages
78
Reaction score
1
I solved the problem, scroll down to Lolaye's post for the solution.

I downloaded the 0.3.9pl1 version of forgottenserver sources
I could compile the server with no problem, configured the config.lua perfectly but when i try to start the server im getting the folowing error:

HTML:
[03/07/2010 18:01:34] Failed connecting to database - MYSQL ERROR: Can't connect to MySQL server on 'localhost' (10061) (2003)

[03/07/2010 18:01:34] > ERROR: Couldn't estabilish connection to SQL database!

this is how my config.lua looks like:

Code:
sqlType = "mysql"
sqlHost = "localhost"
sqlPort = 3306
sqlUser = "root"
sqlPass = "xxxx"
sqlDatabase = "warot"
sqlFile = "mysql.sql" --I picked this file from the schema folder (might be the problem?)
sqlKeepAlive = 0
mysqlReadTimeout = 10
mysqlWriteTimeout = 10
encryptionType = "plain"

I have xampp ON also, both mysql and Apache are "running"

can any of you spot the problem?
Thanks in advance

yours~

Kird
 
Last edited:
I don't know if this is the problem, but, at least in my config.lua I have it like this:

Code:
sqlFile = "forgottenserver.s3db"
 
i tried that but still doesnt work

Do i have to import this forgottenserver.s3db on the myPhpAdmin database?
right now im useing the mysql.sql file that comes on the schema folder

again, thnx for the fast reply

bump
 
Last edited by a moderator:
Correct config should look like this

Lua:
        sqlType = "mysql"
	sqlHost = "localhost"
	sqlPort = 3306
	sqlUser = "root"
	sqlPass = "anco"
	sqlDatabase = "server1"
	sqlFile = "theforgottenserver.s3db"
	sqlKeepAlive = 0
	mysqlReadTimeout = 10
	mysqlWriteTimeout = 10
	encryptionType = "plain"


Make sure you can access database by going to

ip/phpmyadmin

with the name user root and pass you have. And make sure its correct with same in config.lua
 
can anyone help me plz

[12/06/2018 14:25:12] Failed connecting to database - MYSQL ERROR: Can't connect to MySQL server on 'localhost' (10061) (2003)

[12/06/2018 14:25:12] > ERROR: Couldn't estabilish connection to SQL database!
 
Back
Top