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

Linux TFS can't connect database in VPS

Metal Mouth

Developer
Joined
Oct 7, 2015
Messages
55
Reaction score
7
Hello, im using compiled TFS 1.1 on UBUNTU 15.10 VPS. I have problem somewhere while installing apache, phpmyadmin, mysql and php. I can't connect to database. not with myipadress/phpmyadmin. End serult is following:

Code:
>> Loading config
>> Establishing database connection...
MySQL Error Message: Can't connect to MySQL server on '149.202.51.29' (111)
> ERROR: Failed to connect to database.
>> No services running. The server is NOT online.

I used
Code:
apt-get install -y apache2 php5 mysql-server php5-mysql phpmyadmin

and checked versions. I have set root password, clicked no on DBCONFIG question, choosen Apache and I have still problem with connections.

I also dont know hot to import acc maker. I thought coping whole Znte acc https://github.com/Znote/ZnoteAAC into www folder would solve problem.
 
Hello, im using compiled TFS 1.1 on UBUNTU 15.10 VPS. I have problem somewhere while installing apache, phpmyadmin, mysql and php. I can't connect to database. not with myipadress/phpmyadmin. End serult is following:

Code:
>> Loading config
>> Establishing database connection...
MySQL Error Message: Can't connect to MySQL server on '149.202.51.29' (111)
> ERROR: Failed to connect to database.
>> No services running. The server is NOT online.
You need to configure correct mysql username and password in config.lua.
I would first try to run the server using 127.0.0.1 before using the public ip, just to see if you can get it to start up.

and checked versions. I have set root password, clicked no on DBCONFIG question, choosen Apache and I have still problem with connections.

I also dont know hot to import acc maker. I thought coping whole Znte acc https://github.com/Znote/ZnoteAAC into www folder would solve problem.
According to your ip: http://149.202.51.29/ it says /var/www/html/
(remove index.html to get rid of that default info page).

Your phpmyadmin is at: http://149.202.51.29/phpmyadmin/
You can set up mysql username and accounts there.
 
my config.lua
Code:
-- Combat settings
-- NOTE: valid values for worldType are: "pvp", "no-pvp" and "pvp-enforced"
worldType = "pvp"
hotkeyAimbotEnabled = true
protectionLevel = 300
killsToRedSkull = 3
killsToBlackSkull = 6
pzLocked = 60000
removeChargesFromRunes = false
timeToDecreaseFrags = 24 * 60 * 60 * 1000
whiteSkullTime = 15 * 60 * 1000
stairJumpExhaustion = 2000
experienceByKillingPlayers = false
expFromPlayersLevelRange = 75

-- Connection Config
-- NOTE: maxPlayers set to 0 means no limit
ip = "149.202.51.29"
bindOnlyGlobalAddress = false
loginProtocolPort = 7171
gameProtocolPort = 7172
statusProtocolPort = 7171
maxPlayers = 200
motd = "Test Motd1!"
onePlayerOnlinePerAccount = true
allowClones = false
serverName = "Papieski"
statusTimeout = 5000
replaceKickOnLogin = true
maxPacketsPerSecond = 25

-- Deaths
-- NOTE: Leave deathLosePercent as -1 if you want to use the default
-- death penalty formula. For the old formula, set it to 10. For
-- no skill/experience loss, set it to 0.
deathLosePercent = -1

-- Houses
-- NOTE: set housePriceEachSQM to -1 to disable the ingame buy house functionality
housePriceEachSQM = 10000
houseRentPeriod = "month"

-- Item Usage
timeBetweenActions = 200
timeBetweenExActions = 1000

-- Map
-- NOTE: set mapName WITHOUT .otbm at the end
mapName = "papieskiot"
mapAuthor = "Metal Mouth"

-- Market
marketOfferDuration = 30 * 24 * 60 * 60
premiumToCreateMarketOffer = true
checkExpiredMarketOffersEachMinutes = 60
maxMarketOffersAtATimePerPlayer = 100

-- MySQL
mysqlHost = "149.202.51.29"
mysqlUser = "root"
mysqlPass = "passwordhere"
mysqlDatabase = "papieskiot"
mysqlPort = 3306
mysqlSock = ""

-- Misc.
allowChangeOutfit = true
freePremium = false
kickIdlePlayerAfterMinutes = 15
maxMessageBuffer = 4
emoteSpells = true
classicEquipmentSlots = false

-- Rates
-- NOTE: rateExp is not used if you have enabled stages in data/XML/stages.xml
rateExp = 8.1
rateSkill = 435
rateLoot = 6
rateMagic = 28
rateSpawn = 1

-- Monsters
deSpawnRange = 2
deSpawnRadius = 50

-- Stamina
staminaSystem = true

-- Scripts
warnUnsafeScripts = true
convertUnsafeScripts = true

-- Startup
-- NOTE: defaultPriority only works on Windows and sets process
-- priority, valid values are: "normal", "above-normal", "high"
defaultPriority = "high"
startupDatabaseOptimization = false

-- Status server information
ownerName = ""
ownerEmail = ""
url = ""
location = "Poland"

password is ok.

And server works perfectly on 127.0.0.1 but on public ip it doesn't

I deleted index.thml but apach2 ubuntu default page is still working.
I pasted znote acc both in www and in html folders but its still nothing.


EDIT:
I changed mysql ip to localhost, after that i got socket error
Code:
>> Loading config
>> Establishing database connection...
MySQL Error Message: Can't connect to local MySQL server through socket '' (111)
> ERROR: Failed to connect to database.
>> No services running. The server is NOT online.

And still cant set up Znote aac manager


EDIT2
Change ip from localhost to 127.0.0.1 and now server is going online

Now i can't login into OTS. I created account in phpmyadmin but i says acc number or password is wrong. And still can't set up Znote aac
 
Last edited:
Back
Top