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

Windows Can't connect to MySQL

ZeeBeast

Preferable Beta Tester
Joined
Dec 5, 2013
Messages
206
Reaction score
10
Location
United States
Okay, So I know this answer has to be out there somewhere, but I have been searching and searching for about 8 hours straight.
I keep getting this error and I have no idea how to fix it:
Code:
[1:15:24.115] >> Starting SQL connection
[1:15:45.127] Failed connecting to database - MYSQL ERROR: Can't connect to MySQL server on 'xx' (10060) (2003)

[1:15:45.139] > ERROR: Couldn't estabilish connection to SQL database!
The problem is, The server runs fine on 127.0.0.1, but myself and a friend both want to work on it, so we both have to be online. So I can't have it just localhost, I need to actually host it for now.
I have absolutely no idea what I'm doing wrong because as I said, it runs fine on 127.0.0.1 but as soon as I change the IP, its all messed up.
I have tried making new users on PHPMyAdmin. I have tried creating new databases, and I have tried creating a domain name, and I forwarded my ports.
Somebody please help me D:

I am using 8.6 client, TFS0.4 rev 3777
Here is the Config code atm:
Code:
    sqlType = "mysql"
    sqlHost = "xx"
    sqlPort = 3306
    sqlUser = "newnew"
    sqlPass = "8eXahiw8zJe5xxUo"
    sqlDatabase = "newnew"
    sqlFile = "theforgottenserver.s3db"
    sqlKeepAlive = 0
    mysqlReadTimeout = 10
    mysqlWriteTimeout = 10
    encryptionType = "plain"
 
Last edited by a moderator:
you should be hosting it on 127.0.0.1, the machine you're running the server on
nobody else needs to access MySQL other than the server, you don't need to make it available to everybody
what you do need to do is port forward, open up port 7171 and 7172 in your router then change the ip address of the server to the machine's public ipv4 address
 
Let me ask some diagnostic questions.

1. Do you really want to have the database running on the other IP? (other server?)

2. What OS are you running?

3. Do you have any firewall running?
 
you should be hosting it on 127.0.0.1, the machine you're running the server on
nobody else needs to access MySQL other than the server, you don't need to make it available to everybody
what you do need to do is port forward, open up port 7171 and 7172 in your router then change the ip address of the server to the machine's public ipv4 address
Where can I change the ip of just the server? I thought that was in config?

Let me ask some diagnostic questions.

1. Do you really want to have the database running on the other IP? (other server?)

2. What OS are you running?

3. Do you have any firewall running?
Eventually I'll get dedicated. For now I just want to run it to troubleshoot and stuff.
Windows 10
Nope. All disabled.
 
Where can I change the ip of just the server? I thought that was in config?


Eventually I'll get dedicated. For now I just want to run it to troubleshoot and stuff.
Windows 10
Nope. All disabled.
it is in the config, look for the
Code:
ip = "iphere"
 
Back
Top