• 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 estabilish connection to SQL database!

waqmaz

Member
Joined
Jun 17, 2015
Messages
203
Reaction score
11
Hello.
While I want to connect to my OTS using xampp (localhost), everything works well with these parameters:

Code:
    sqlType = "mysql"
    sqlHost = "localhost"
    sqlPort = 3306
    sqlUser = "root"
    sqlPass = ""
    sqlDatabase = "ots"
    encryptionType = "sha1"

I've decided to buy a test server for my database on http://www.linuxpl.com and the OTServer throws an error: "Couldn't estabilish connection to SQL database!" while it has parameters:

Code:
    sqlType = "mysql"
    sqlHost = "213.239.198.234"
    sqlPort = 3306
    sqlUser = "john"
    sqlPass = "lol123"
    sqlDatabase = "john_db"
    encryptionType = "sha1"

Everything is okay, but it still does not work. I don't have mind for it. What am I doing wrong? Ofcourse, I've uploaded schema/mysql.sql to database (phpmyadmin). Should works well, but is not. :(
Please, help me.
 
3306 is open so don't worry
Code:
sqlHost = "213.239.198.234"
change it to
Code:
sqlHost = 213.239.198.234
not sure if a direct ip is read as a string or not, so this might work
 
hmm havn't tried to use another sql host then localhost so far, let me look a bit through sources, so I might get a clue on what it could be.
 
You could try changing your
Code:
sqlHost = "213.239.198.234"
To
Code:
sqlHost = "127.0.0.1"
Or
Code:
sqlHost = "localhost"

EDIT:
Nevermind. I did not read that you bought a server. Whoopsie
 
I have opened all ports, I have allowed my IP address on external database host, I have created tables in database from schema folder. I have put this to config.lua:
Code:
    sqlType = "mysql"
    sqlHost = "213.239.198.234" -- external database
    sqlPort = 3306
    sqlUser = "lidia92_ots"
    sqlPass = "mypass"
    sqlDatabase = "lidia92_ots"
WHAT IS THE BEST, SERVER THROWS AN ERROR, USING "LOCALHOST" LOL:
[18/05/2016 18:11:47] Failed connecting to database - MYSQL ERROR: Access denied for user 'lidia92_ots'@'localhost' (using password: TAK) (1045)

[18/05/2016 18:11:47] > ERROR: Couldn't estabilish connection to SQL database!

I've tried with 2 diffrent computers and 2 diffrent modems and diffrent databases. Everywhere the problem looks the same.
 
Last edited:
bump
If here is someone who started his Open Tibia Server on external database and can help?
just wondering, maybe its because of encryptionType = "sha1"? but i dont think so
 
Last edited:
Hello.
While I want to connect to my OTS using xampp (localhost), everything works well with these parameters:

Code:
    sqlType = "mysql"
    sqlHost = "localhost"
    sqlPort = 3306
    sqlUser = "root"
    sqlPass = ""
    sqlDatabase = "ots"
    encryptionType = "sha1"

I've decided to buy a test server for my database on http://www.linuxpl.com and the OTServer throws an error: "Couldn't estabilish connection to SQL database!" while it has parameters:

Code:
    sqlType = "mysql"
    sqlHost = "213.239.198.234"
    sqlPort = 3306
    sqlUser = "john"
    sqlPass = "lol123"
    sqlDatabase = "john_db"
    encryptionType = "sha1"

Everything is okay, but it still does not work. I don't have mind for it. What am I doing wrong? Ofcourse, I've uploaded schema/mysql.sql to database (phpmyadmin). Should works well, but is not. :(
Please, help me.
Hey man I also got the same problems.
Would you like to help me?
 
Hey man I also got the same problems.
Would you like to help me?
It is because of the host type. Linuxpl.com isn't for games. It is for www sites. That is why it doesn't work. i bought minthost.pl and works perfectly, but i've got debian. had to install ubuntu 14. now everything works very well on a screen using ubuntu. :)
I was the biggest dumb ever trying to start an OTS using webhosting, I was like lollolololololler, lol. 11 years of programming here, but have never had a server XD
 
Last edited:

Similar threads

Back
Top