Hello, i changed from an old version of Avesta to Avesta v4.
I get this error :
"Error: Failed to connect to database"
What do i need to change to make the server work?
Thanks.
I get this error :
"Error: Failed to connect to database"
Code:
-- Avesta
-- Connection
-- NOTE: defaultPriority works only on Windows
ip = "MYIP"
port = "7171"
loginTries = 10
retryTimeout = 5000
loginTimeout = 60 * 1000
allowClones = 0
checkAccounts = true
motd = "Welcome to Avesta!"
loginMessage = "Welcome to Avesta!"
serverName = "Avesta"
worldName = "Avesta"
maxPlayers = "1000"
-- Database
sqlType = "mysql"
sqlDatabaseName = "otserv2"
sqlHost = "localhost"
sqlPort = 3306
sqlUser = "root"
sqlPass = ""
passwordType = "plain"
storePlayerDeathsInDB = false
-- Global save
-- NOTE: globalSaveHour means like 08:00, not that it will save every 8 hours
-- may be unstable, we recommend using OTAdmin if you want real saves.
-- NOTE: If you set autoSaveEachMinutes = 0, ausave but disabled
globalSaveEnabled = false
globalSaveHour = 8
shutdownAtGlobalSave = false
autoSaveEachMinutes = 1
-- Unjustified kills
timeToDecreaseFrags = 24 * 60 * 60 * 1000
whiteSkullTime = 15
killsToRedSkull = 3
-- Banishments
notationsToBan = 3
warningsToFinalBan = 4
warningsToDeletion = 5
banLength = 1 * 24 * 60 * 60
finalBanLength = 7 * 24 * 60 * 60
ipBanishmentLength = 24 * 60 * 60
killsToBan = 7
-- Battle
worldType = "pvp"
exhausted = 1000
fightExhausted = 2000
healExhausted = 1000
exhaustedAdd = 200
pzLock = 60000
fieldOwnershipDuration = 5000
removeAmmunition = false
removeRuneCharges = false
removeWeaponCharges = true
playersCannotChangeOutfit = false
useCapSystem = true
deathLosePercent = 10
showAnnimationLevelSkill = false
-- Change sex
changeSexPrice = 10000
changeSexOnlyPremium = true
-- Map
dataDirectory = "data/"
map = "data/world/world2.otbm"
mapKind = "OTBM"
mapStoreType = "relational"
randomizeTiles = true
-- Clean
cleanMapAtGlobalSave = true
-- Houses
houseRentPeriod = "monthly"
housePriceEachSqm = 1000
levelToBuyHouse = 8
housesOnlyPremiumAccounts = true
bedsOnlyPremiumAccount = true
-- Item usage
minActionInterval = 200
minActionExInterval = 1000
-- Premium account
freePremium = false
-- Rates
rateExp = 9999
rateSkill = 10
rateMagic = 10
rateLoot = 10
-- Spawns
rateSpawn = 1
spawnRange = 2
spawnRadius = 50
-- Others
maxMessageBuffer = 4
saveClientDebug = false
useAccBalance = false
maxIdleTime = 15
-- Rook system
levelToRook = 5
rookTempleId = 1
-- Status
ownerName = "Tryller"
ownerEmail = "@youremailhere"
url = "http://yourwebsitehere.com/"
location = "Brazil"
What do i need to change to make the server work?
Thanks.