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

TFS 1.X+ "cannot open config.lua: No such file or directory"

radzradz

New Member
Joined
Nov 19, 2024
Messages
6
Reaction score
1
As you can see i don't have "config.lua" file, just "config.lua.dist" on main folder.
1. Rename/copy config.lua.dist to config.lua
2. Move build/tfs file into main OTS folder - tfs file, config.lua and data folder must be in same folder

EDIT:
I've noticed on screenshot that you run it using /home/radz/Desktop/forgottenserver-1.6/build/tfs.
You may need to first cd to folder and then run tfs (after moving tfs from build folder to main OTS folder):
Code:
cd /home/radz/Desktop/forgottenserver-1.6
./tfs
 
Last edited:
1. Rename/copy config.lua.dist to config.lua
2. Move build/tfs file into main OTS folder - tfs file, config.lua and data folder must be in same folder

EDIT:
I've noticed on screenshot that you run it using /home/radz/Desktop/forgottenserver-1.6/build/tfs.
You may need to first cd to folder and then run tfs (after moving tfs from build folder to main OTS folder):
Code:
cd /home/radz/Desktop/forgottenserver-1.6
./tfs
I tried that, still got the same error. :/
 
Nice, it worked now. "tfs" by itself wasn't working but typing the entire patch after cd to folder worked.
I'm getting this now:
ss3.webp
I got my nginx and php servers running. Not sure if It is the same server.
I'm able to access the admin page using my local IP (i guess) and 2344 port. I did not configure anything here. I don't know what to do from now.
ss4.webp
 
Last edited:
Im getting this now:
If you are running TFS 1.6 there is no MySQL config in config.lua anymore (I'm working on fix for TFS), but you can add it yourself as end of config.lua file:
Code:
mysqlHost = "127.0.0.1"
mysqlUser = "forgottenserver"
mysqlPass = ""
mysqlDatabase = "forgottenserver"
mysqlPort = 3306
mysqlSock = ""
and set it's values to your MySQL login/password/database name.
 
It's trying to establish database connection but after a while i got this:
ss5.webp
Where i can find the database name? I need to configure something inside phpAdmin page?
ss4.webp
 
It's trying to establish database connection but after a while i got this:
View attachment 88344
Where i can find the database name? I need to configure something inside phpAdmin page?
View attachment 88345
Code:
► On the left sidebar, click "New".

► Select your database name and click "Create".

► Your database should be created now and selected.

► At the top, click the "Import" button.

► Click "Choose File" next to "Browse your computer" and locate the "schema.sql" file from TFS sources.

► Scroll down and click "Go".
 
Code:
► On the left sidebar, click "New".

► Select your database name and click "Create".

► Your database should be created now and selected.

► At the top, click the "Import" button.

► Click "Choose File" next to "Browse your computer" and locate the "schema.sql" file from TFS sources.

► Scroll down and click "Go".
Done, but still got same issue. :/
I see my otadmin user does not have "ALL PRIVILEGES" like the other users:
ss6.webp
Is this right?

Edit: Tried tfs version 1.4.2 but still no success. : /
 
Last edited:
Done, but still got same issue. :/
I see my otadmin user does not have "ALL PRIVILEGES" like the other users:
View attachment 88346
Is this right?

Edit: Tried tfs version 1.4.2 but still no success. : /
If you are running TFS 1.6 there is no MySQL config in config.lua anymore (I'm working on fix for TFS), but you can add it yourself as end of config.lua file:
Code:
mysqlHost = "127.0.0.1"
mysqlUser = "forgottenserver"
mysqlPass = ""
mysqlDatabase = "forgottenserver"
mysqlPort = 3306
mysqlSock = ""
and set it's values to your MySQL login/password/database name.

Did you update this part with your information?
Code:
mysqlHost = "127.0.0.1"
mysqlUser = "otadmin"
mysqlPass = "whatever_you_put_as_the_password"
mysqlDatabase = "tfsDB"
mysqlPort = 3306 -- maybe 2344? I saw that in the guide.. just whatever you set it up as I guess
mysqlSock = ""

I don't know what Ubuntu uses to host stuff, but have you also 'turned on' the database?

On windows using Uniform server for example, you need to turn on 'apache' and 'MySQL' through the program for the tfs exe to find them and use them.
------
and yeah, for your user, you probably want all privileges.
Might need to login on the root user to give 'otadmin' full.
 
Did you update this part with your information?
Code:
mysqlHost = "127.0.0.1"
mysqlUser = "otadmin"
mysqlPass = "whatever_you_put_as_the_password"
mysqlDatabase = "tfsDB"
mysqlPort = 3306 -- maybe 2344? I saw that in the guide.. just whatever you set it up as I guess
mysqlSock = ""

I don't know what Ubuntu uses to host stuff, but have you also 'turned on' the database?

On windows using Uniform server for example, you need to turn on 'apache' and 'MySQL' through the program for the tfs exe to find them and use them.
------
and yeah, for your user, you probably want all privileges.
Might need to login on the root user to give 'otadmin' full.
Yeah, i updated the info, when i used the wrong ip or port it's was not even trying to connect but with right ip and port i'ts trying but after 1 min waiting "Establishing database connection..." i got the MySQL message and the error.
ss7.webp
The only part inside config.lua i left blank is "mysqlSock". I'm trying to find some info about that.
 
Back
Top