platano
Active Member
Hello dear forum, I have an issue with my DB connection. I have a webhost that has a cpanel, I decided to put the website on that webhost so I could connect to it instead of putting the OTServer and the website on the same place.
SO I have
1.- Webhost IP aka cPanel = 255.255.255.255
2.- VPS = 127.0.0.1
When I try to connect to my Webhost DB OTServer vomits some logs saying it can't connect because access is denied on my VPS because it's poiting my VPS IP instead of my WebHost IP I specified as "255.255.255.255" as an example, I specified the IP of my DB in config.lua probably I'm missing something can anyone help me out?
My IP is not that mask 255.255.255.255 I just rewrote it to avoid leaking my development IPs
Both 127.0.0.1 and 255.255.255.255 are real IPs I just changed their values to avoid leaking my IPs lets assume they're
35.123.34.59 and 39.34.12.213
SO I have
1.- Webhost IP aka cPanel = 255.255.255.255
2.- VPS = 127.0.0.1
When I try to connect to my Webhost DB OTServer vomits some logs saying it can't connect because access is denied on my VPS because it's poiting my VPS IP instead of my WebHost IP I specified as "255.255.255.255" as an example, I specified the IP of my DB in config.lua probably I'm missing something can anyone help me out?
Lua:
-- Owner Data
ownerName = "platano"
ownerEmail = "[email protected]"
url = "mywebsite.com"
location = "USA"
-- Messages
motd = "Welcome to OT Chaos!"
serverName = "OT Chaos"
loginMessage = "Welcome to The Chaos Server!"
displayGamemastersWithOnlineCommand = false
-- MySql
sqlType = "mysql"
sqlHost = "255.255.255.255"
sqlPort = 3306
sqlUser = "user"
sqlPass = "password"
sqlDatabase = "dbName"
sqlFile = ""
sqlKeepAlive = 0
mysqlReadTimeout = 10
mysqlWriteTimeout = 10
mysqlReconnectionAttempts = 5
encryptionType = "sha1"
-- World / Ip / Port
worldId = 0
ip = "127.0.0.1"
worldType = "open"
bindOnlyGlobalAddress = false
loginPort = 7171
gamePort = "7172"
statusPort = 7171
loginOnlyWithLoginServer = false
Code:
napalm911911@otchaos:~/otserv$ ./server
Compiled with GNU C++ version 5.4.0 20160609 for arch 64 Bits at Jun 3 2020 16:43:30
>> Loading config (config.lua)
>> Opening logs
>> Loading Password encryption:
>>> Using (SHA1) encryption ... (done).
>> Loading RSA key
>> Starting SQL connection
Failed connecting to database - MYSQL ERROR: Access denied for user 'user'@'127.0.0.1' (using password: YES) (1045)
server: databasemysql.cpp:39: DatabaseMySQL::DatabaseMySQL(): Assertion `connect(false)' failed.
Aborted (core dumped)
My IP is not that mask 255.255.255.255 I just rewrote it to avoid leaking my development IPs
Both 127.0.0.1 and 255.255.255.255 are real IPs I just changed their values to avoid leaking my IPs lets assume they're
35.123.34.59 and 39.34.12.213
Last edited: