MySQLOO - Trying to refresh - but couldn't read file!

I’ve just started developing a new addon for GMod which happens to use MySQL integration. I chose MySQLOO as the way to go to do this, and went on my way coding. A few lines in and I decided to test it out on a server, but was unfortunately confronted with this error.

Trying to refresh - but couldn’t read file [addons\TTT - In-Game Achievements (Win)\lua\autorun ttrophies.lua]

This happens after a minute or so of waiting. No other messages are printed inside my code that should be printed. I assume that this has to do with the connection to the database taking too long or timing out? What can I do to solve this?

You might always switch to sqlite.
Afterall, sqlite is better if you are using a single server and don’t want to do cross-server info and even if you use sqlite and want to change it in the future, you can always mix mysql and sqlite.

Regardless of what SQL I use, how can I fix the problem I’m having with this? I’m not even importing/exporting large amounts (or any at all) of information, why is it timing out?

Well, I am not a miracle worker and I can’t find the issue without basic info such as the code.

This has nothing to do with MySQL from the looks of it. Take the spaces/parentheses out of your addon folder name, restart the server and give us an update.

Ok. I’ve seen this error before using mount.cfg

Exactly as KingofBeast says, except I’ve seen it with JUST the hyphen ( the -------- ) in the past. Remove any MAGIC CHARACTERS from file names: [lua]Some characters, called magic characters, have special meanings when used in a pattern. The magic characters are

( ) . % + - * ? [ ^ $


For more info on magic characters, please see:

This post ( OP ) may confirm that there are issues when including files / folders with magic characters in them as I’ve seen the issue in the past using mount.cfg which is a different method of including but caused CS:S and other games to not load which is why on SteamCMD I force-directory. I’ll try doing a few tests later in the day, I’ll see if I can find a work-around / fix for leaving them in, or prove if they can’t be used at all which is what I’m going to start out assuming. Files names may be using patterns instead of obvious locations such as file.Find…

Worked like a charm. However, now I have this problem.

Try this.

db = mysqloo.connect(“”, “user”, “pass”, “dbase”, 3306) – Your information

db.onConnectionFailed = function(self, err)
print("MySQL connection failed: " … err)

db.onConnected = function(self)
print("MySQL connection established at " …


It was just a bug where I had to spawn a bot/join the server first, everything is working now.

Sort of…

Is it worth using MySQLOO to store things like kills, deaths, etc. for players permanently? Or is this the most efficient way?

For record keeping that would be accessed outside of the server, MySQL is a great solution.

I got it working smoothly, one of the most useful GMod addons I’ve used so far.