Poll

Would this be useful for you?

Yes
No

Author Topic: ULX MySQLOO  (Read 70923 times)

0 Members and 2 Guests are viewing this topic.

Offline MKServers

  • Newbie
  • *
  • Posts: 10
  • Karma: 3
ULX MySQLOO
« on: August 14, 2012, 06:54:26 PM »
UPDATED FOR GMOD 13

That's right, I went through and fixed it up. It also now updates its data when you change a user's access. This should help with possible issues with connections.
It will save names with the data, so do with it what you please. To configure it, open mysql.lua and edit the top variables. Make sure ULX_HOST uses an external ip(I haven't been able to work with localhost). Also, if you already have a table called ulx in the same database, change the name so it can create the table. Other then that, happy servering!

One small big difference is also any users defined prior installation of this will be moved to users as to avoid exploits.

If you can't find the download link, you are not logged in.

To install MySQLOO, go here: http://facepunch.com/showthread.php?t=1220537
« Last Edit: August 24, 2013, 12:32:35 PM by MKServers »

Offline MoSs

  • Newbie
  • *
  • Posts: 3
  • Karma: 1
Re: ULX MySQLOO
« Reply #1 on: August 20, 2012, 04:16:00 AM »
hey thanks for this, it's something I've wanted to put on my servers for quite a while

well I set it up properly, created a new db in mysql and put db/user/pass settings in the lua file but when someone joins I get this:

ERROR: Hook 'PlaceUserToTheirGroup' Failed: [addons\ulx\lua\ulx\modules\sh\mysql.lua:76] attempt to index local 'queryQ' (a nil value)
Removing Hook 'PlaceUserToTheirGroup'


well i checked your script a bit, and it should create the tables needed, but the db is empty, it didn't create anything, am I missing something?

ps. MySQLOO is in my addons and working properly because I'm already using sourcebans with it.
« Last Edit: August 20, 2012, 04:17:38 AM by MoSs »

Offline MoSs

  • Newbie
  • *
  • Posts: 3
  • Karma: 1
Re: ULX MySQLOO
« Reply #2 on: August 20, 2012, 05:26:42 AM »
Nevermind about that, I figured out the problem. For some reason it didn't want to connect to the DB using "localhost" so I used directly the IP address of the server, however your script doesn't create the table "ulxmysql" in the database, I had to manually create it.

Other than that I works as expected :) thanks again

Offline MKServers

  • Newbie
  • *
  • Posts: 10
  • Karma: 3
Re: ULX MySQLOO
« Reply #3 on: September 04, 2012, 04:56:50 PM »
*SNIP*
« Last Edit: August 23, 2013, 08:52:41 PM by MKServers »

Offline MKServers

  • Newbie
  • *
  • Posts: 10
  • Karma: 3
Re: ULX MySQLOO
« Reply #4 on: April 08, 2013, 08:01:08 PM »
*SNIP*
« Last Edit: August 23, 2013, 08:52:19 PM by MKServers »

Offline bubblecon11

  • Newbie
  • *
  • Posts: 14
  • Karma: -1
Re: ULX MySQLOO
« Reply #5 on: April 24, 2013, 08:02:06 PM »
Code: [Select]
[ERROR] addons/ulx/lua/ulx/modules/sh/mysql.lua:9: Couldn't load module library!
  1. require - [C]:-1
   2. unknown - addons/ulx/lua/ulx/modules/sh/mysql.lua:9
    3. include - [C]:-1
     4. unknown - addons/ulx/lua/ulx/init.lua:33
      5. include - [C]:-1
       6. unknown - addons/ulx/lua/ulib/modules/ulx_init.lua:2
        7. include - [C]:-1
         8. unknown - addons/ulib/lua/ulib/init.lua:75
          9. include - [C]:-1
           10. unknown - addons/ulib/lua/autorun/ulib_init.lua:3

Offline nathan736

  • Full Member
  • ***
  • Posts: 143
  • Karma: 4
Re: ULX MySQLOO
« Reply #6 on: April 25, 2013, 06:48:48 AM »
might be that it cant find the library ?
a person asked me how to code lua and i said this " its like building a rocket up side down then  realizing you did it all wrong."

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: ULX MySQLOO
« Reply #7 on: April 26, 2013, 01:03:10 AM »
Code: [Select]
[ERROR] addons/ulx/lua/ulx/modules/sh/mysql.lua:9: Couldn't load module library!
  1. require - [C]:-1
   2. unknown - addons/ulx/lua/ulx/modules/sh/mysql.lua:9
    3. include - [C]:-1
     4. unknown - addons/ulx/lua/ulx/init.lua:33
      5. include - [C]:-1
       6. unknown - addons/ulx/lua/ulib/modules/ulx_init.lua:2
        7. include - [C]:-1
         8. unknown - addons/ulib/lua/ulib/init.lua:75
          9. include - [C]:-1
           10. unknown - addons/ulib/lua/autorun/ulib_init.lua:3

Did you actually install the MySQLOO module and make sure that it worked?

From your server console, type the following:
Code: [Select]
lua_run require("mysqloo")

If you get nothing then it is installed correctly. If it throws a bunch of errors, then it's not and you need to install the module correctly.

Offline TweaK

  • Jr. Member
  • **
  • Posts: 80
  • Karma: 14
    • Garry's Mod Engineers
Re: ULX MySQLOO
« Reply #8 on: April 26, 2013, 01:35:45 PM »
Usually "couldn't load module library" means the module itself is loading but libmysql was not installed correctly


Offline bubblecon11

  • Newbie
  • *
  • Posts: 14
  • Karma: -1
Re: ULX MySQLOO
« Reply #9 on: April 26, 2013, 01:43:31 PM »
Code: [Select]
[ERROR] lua_run:1: Couldn't load module library!
1. require - [C]:-1
2. unknown - lua_run:1

:/ Even though it is installed

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: ULX MySQLOO
« Reply #10 on: April 26, 2013, 02:22:14 PM »
What path is your mysqlloo.dll file?
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: ULX MySQLOO
« Reply #11 on: April 26, 2013, 03:56:03 PM »
Why are there two attachments of the same name on the first post? Is one newer than the other?
Experiencing God's grace one day at a time.

Offline bubblecon11

  • Newbie
  • *
  • Posts: 14
  • Karma: -1
Re: ULX MySQLOO
« Reply #12 on: April 26, 2013, 04:23:13 PM »
My mysqloo is in garrysmod/lua/bin.

Attempting to use other file.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: ULX MySQLOO
« Reply #13 on: April 26, 2013, 08:32:31 PM »
Do you also have libmySQL.dll in your <accountname>/garrysmod folder?

The same folder that has hl2.exe

There are 2 files that HAVE to be in the right area in order for MySQLOO to work.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: ULX MySQLOO
« Reply #14 on: May 20, 2013, 07:14:32 AM »
the ! in that statement represents not.

Garry added in some non-standard lua operators. !(ply:IsUserGroup("user")) is the same as writing not ply:IsUserGroup("user")