Assuming that both are servers with public IPs (2 VPSes/2 dedics):
1. On computer with TFS make database (MySQL/MariaDB) listens on all IPs (IP
0.0.0.0
in config) ex. for MariaDB replace
bind-address = 127.0.0.1
to
bind-address = 0.0.0.0
in
/etc/mysql/mariadb.conf.d/50-server.cnf
and restart MySQL (
sudo systemctl restart mysql
).
2. In database (MySQL/MariaDB) allow some account (ex.
root
) to login from IP
%
, which means 'any ip' - phpmyadmin or some other tool to edit it. Often it's set to
127.0.0.1
by default.
3. On computer with website put copy of TFS files somewhere, then edit
config.lua
and make it point to server with TFS database ex.:
LUA:
-- your TFS and MySQL server IP
mysqlHost = "12.34.56.78"
mysqlUser = "root"
mysqlPass = "secretpassword"
mysqlDatabase = "forgottenserver"
mysqlPort = 3306
mysqlSock = ""