1. Post #361
    Gold Member
    Fleamonji's Avatar
    April 2010
    627 Posts
    Does this not work on Linux? I know that there's a binary for it, but it doesn't load. There's also no libthing that goes in orangebox

    Edited:

    No libMYSQL.dll in the Linux one, that's it. Module won't load without it I believe
    Reply With Quote Edit / Delete United States Show Events Dumb Dumb x 1 (list)

  2. Post #362
    Gold Member

    April 2011
    384 Posts
    I think you need to use libmysql.so for Linux.

    Edited:

    It should be in /usr/lib/mysql/ .
    Reply With Quote Edit / Delete Netherlands Show Events Agree Agree x 2 (list)

  3. Post #363
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    Look for my posts a few pages back. They tell you how to get it working for linux. Really should be in the OP, but whatever.
    Reply With Quote Edit / Delete United States Show Events Disagree Disagree x 1 (list)

  4. Post #364
    Gold Member

    April 2011
    384 Posts
    Here's the ones from my server if anyone needs them:
    http://82.192.94.157/f/libmysql-linux.zip
    Reply With Quote Edit / Delete Netherlands Show Events Friendly Friendly x 2 (list)

  5. Post #365

    April 2010
    16 Posts
    Here's the ones from my server if anyone needs them:
    http://82.192.94.157/f/libmysql-linux.zip
    Lawl. Just the IP Number with No Domain, Obvious Virus.
    I do NOT RECOMMEND DOWNLOADING THIS.
    Reply With Quote Edit / Delete Germany Show Events Dumb Dumb x 14Lua King Lua King x 2 (list)

  6. Post #366
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    http://www.facepunch.com/threads/933...1#post25138989

    Also, rename the binaries to gmsv_mysqloo_linux.dll and gmcl_mysqloo_linux.dll
    Reply With Quote Edit / Delete United States Show Events Late Late x 2 (list)

  7. Post #367
    Buggzie's Avatar
    December 2009
    965 Posts
    Lawl. Just the IP Number with No Domain, Obvious Virus.
    I do NOT RECOMMEND DOWNLOADING THIS.
    http://192.168.0.1

    Lawl Just the IP number with no domain, Obvious Virus

    Now how am I gonna setup my router!?

    It's a zip containing .so files. What's so virusy about that?

    I'm feeling genourous, if you think it's a virus then use this alternative link: http://storage.gmodsvns.net/libmysql-linux.zip
    Reply With Quote Edit / Delete Australia Show Events Funny Funny x 3Agree Agree x 1 (list)

  8. Post #368

    April 2010
    16 Posts
    http://192.168.0.1

    Lawl Just the IP number with no domain, Obvious Virus

    Now how am I gonna setup my router!?

    It's a zip containing .so files. What's so virusy about that?

    I'm feeling genourous, if you think it's a virus then use this alternative link: http://storage.gmodsvns.net/libmysql-linux.zip
    subdomain = virus
    get reel domaen then i download -.-

    (User was banned for this post ("Shit posting" - Swebonny))
    Reply With Quote Edit / Delete Germany Show Events Funny x 5Dumb x 4Disagree x 2Artistic x 1Agree x 1 (list)

  9. Post #369
    Buggzie's Avatar
    December 2009
    965 Posts
    subdomain = virus
    get reel domaen then i download -.-
    I can't understand this, but are you being sarcastic? Kinda hard to tell with text.
    Reply With Quote Edit / Delete Australia Show Events Agree Agree x 2Dumb Dumb x 1 (list)

  10. Post #370

    August 2007
    152 Posts
    Does this not work on Linux? I know that there's a binary for it, but it doesn't load. There's also no libthing that goes in orangebox

    Edited:

    No libMYSQL.dll in the Linux one, that's it. Module won't load without it I believe
    Install the MySQL lib with apt-get
    Reply With Quote Edit / Delete United States Show Events Informative Informative x 1 (list)

  11. Post #371
    Jaastin's Avatar
    September 2010
    440 Posts
    He only compiled it for 32bit windows. Basically libmySQL exists in 64bit. Just need the other 2 DLLs recompiled.

    EDIT:
    I found a work around. Instead of recompiling it, just install the 32bit visual libraries.
    http://www.microsoft.com/downloads/d...displaylang=en
    Confirming, this works.

    PROBLEM!

    MySQL server has gone away. Line 59, of Data.
    Reply With Quote Edit / Delete Canada Show Events

  12. Post #372
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    Confirming, this works.

    PROBLEM!

    MySQL server has gone away. Line 59, of Data.
    Means your connection died from idling for too long.
    Reply With Quote Edit / Delete United States Show Events

  13. Post #373
    Buggzie's Avatar
    December 2009
    965 Posts
    Confirming, this works.

    PROBLEM!

    MySQL server has gone away. Line 59, of Data.
    Try to either change mysql commandline connect-timeout or get the lua script to reconnect.
    Reply With Quote Edit / Delete Australia Show Events Dumb Dumb x 1 (list)

  14. Post #374

    August 2007
    152 Posts
    see http://www.facepunch.com/threads/933...1#post26221004 for info about changing the timeout at runtime
    Reply With Quote Edit / Delete United States Show Events Informative Informative x 1 (list)

  15. Post #375
    zzaacckk's Avatar
    June 2009
    2,153 Posts
    Now I connected .. but how do I disconnect?
    Reply With Quote Edit / Delete United States Show Events

  16. Post #376
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    Now I connected .. but how do I disconnect?
    Would setting the connection to nil terminate the connection?
    Reply With Quote Edit / Delete United States Show Events

  17. Post #377
    zzaacckk's Avatar
    June 2009
    2,153 Posts
    No.
    Reply With Quote Edit / Delete United States Show Events

  18. Post #378
    Buggzie's Avatar
    December 2009
    965 Posts
    Now I connected .. but how do I disconnect?
    That's a rather good point, not even tmysql has a disconnect...
    Reply With Quote Edit / Delete Australia Show Events Agree Agree x 2Dumb Dumb x 1 (list)

  19. Post #379
    zzaacckk's Avatar
    June 2009
    2,153 Posts
    That's a rather good point, not even tmysql has a disconnect...
    Yea. I am thinking of designing a php mysql tool for server owners so they can run queries that way and have it highly customized.
    Reply With Quote Edit / Delete United States Show Events

  20. Post #380
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    Yea. I am thinking of designing a php mysql tool for server owners so they can run queries that way and have it highly customized.
    wait... wut?
    Reply With Quote Edit / Delete United States Show Events

  21. Post #381
    zzaacckk's Avatar
    June 2009
    2,153 Posts
    Or you could check if the connection is still alive and if not then reconnect and run the query.
    Reply With Quote Edit / Delete United States Show Events

  22. Post #382
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    Or you could check if the connection is still alive and if not then reconnect and run the query.
    Agreed. Just be sure to check and see if it is doing science and still alive.
    Reply With Quote Edit / Delete United States Show Events

  23. Post #383
    Yes, setting the object to nil will close the connection.
    Reply With Quote Edit / Delete United Kingdom Show Events Informative Informative x 1 (list)

  24. Post #384
    zzaacckk's Avatar
    June 2009
    2,153 Posts
    Yes, setting the object to nil will close the connection.
    AFAIK, the connection will still be open you will just be unable to access it.
    Reply With Quote Edit / Delete United States Show Events Informative Informative x 1 (list)

  25. Post #385
    If you unreference the object the connection should automatically close.
    Reply With Quote Edit / Delete United Kingdom Show Events

  26. Post #386
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    If you unreference the object the connection should automatically close.
    That was my point. I hadn't tested it though.
    Reply With Quote Edit / Delete United States Show Events

  27. Post #387
    TGiFallen's Avatar
    January 2010
    1,440 Posts
    AFAIK, the connection will still be open you will just be unable to access it.
    And once you are unable to access it the Lua garbage collector will unallocate the connection from memory, and then the connection will be closed.
    Reply With Quote Edit / Delete Canada Show Events Agree Agree x 3 (list)

  28. Post #388
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    And once you are unable to access it the Lua garbage collector will unallocate the connection from memory, and then the connection will be closed.
    Indeed. It is interesting to see how many people think of connections as magical gateways that exist outside of normal programming. Network connections are two machines ( or even one, or more than two :O ) that are sending information to each other. If one of those two machines stops sending data, the connection is closed.

    AFAIK, mysql gets pings as long as an active connection is open, and closes when it stops getting those pings. When it gets a request for data, it does the query and sends the data back. So idle connections only take up ping-sized bandwidth, and once the pings stop, mysql closes that connection.

    So once the mysqloo instance is dropped from memory, the connection dies since it isn't being kept up by the server any more.

    Please correct me if I am wrong.
    Reply With Quote Edit / Delete United States Show Events Informative Informative x 1 (list)

  29. Post #389
    zzaacckk's Avatar
    June 2009
    2,153 Posts
    Please correct me if I am wrong.
    You are all wrong.



    As you see the code I ran is to the right.

    II first did a netstat
    After that I opened the connection
    I did anothe netstat and it showed the connection had opened
    I then nilled the connection
    I performed another netstat and noticed the connection was still open

    This proves that nilling the connection dosent close the connection, it just makes you unable to access it.
    Reply With Quote Edit / Delete United States Show Events

  30. Post #390
    NightExcessive's Avatar
    July 2010
    20 Posts
    You are all wrong.



    As you see the code I ran is to the right.

    II first did a netstat
    After that I opened the connection
    I did anothe netstat and it showed the connection had opened
    I then nilled the connection
    I performed another netstat and noticed the connection was still open

    This proves that nilling the connection dosent close the connection, it just makes you unable to access it.
    Garbage collection doesn't run immediately after you nil the connection.

    G.collectgarbage
    Reply With Quote Edit / Delete United States Show Events Agree Agree x 2 (list)

  31. Post #391
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    You are all wrong.



    As you see the code I ran is to the right.

    II first did a netstat
    After that I opened the connection
    I did anothe netstat and it showed the connection had opened
    I then nilled the connection
    I performed another netstat and noticed the connection was still open

    This proves that nilling the connection dosent close the connection, it just makes you unable to access it.
    The connection itself is being run in another thread from the lua interface, isn't it?
    So actually, nilling the lua interface doesn't kill the connection...

    Probably needs a function to kill the connection thread then. Does the connection close when you close gmod?

    Edited:

    Garbage collection doesn't run immediately after you nil the connection.

    G.collectgarbage
    Or this. Try this too =P
    Reply With Quote Edit / Delete United States Show Events

  32. Post #392
    zzaacckk's Avatar
    June 2009
    2,153 Posts
    When you connect to the database it opens a connection up to the database.
    When you assign that to a variable you are able to do SET things to that variable.
    If you do not assign it to a variable it will still open, yet the variable will be nil because it was never set.
    So if you set the variable and then nil it it will still remain open.
    The only way for it to close is if the code tells it to close.

    Example.
    mysqloo.connect(host,user,pass,db,port)
    -- That will connect although no variable is assigned
    
    mysqloo.connect(host,user,pass,db,port) = nil
    -- That will connect although no variable is assigned, it is the same as above.
    
    conn = mysqloo.connect(host,user,pass,db,port)
    conn = nil
    -- That will not close the connection
    

    BTW, I did what you said and it didn't work, as I predicted.
    Reply With Quote Edit / Delete United States Show Events

  33. Post #393
    NightExcessive's Avatar
    July 2010
    20 Posts
    When you connect to the database it opens a connection up to the database.
    When you assign that to a variable you are able to do SET things to that variable.
    If you do not assign it to a variable it will still open, yet the variable will be nil because it was never set.
    So if you set the variable and then nil it it will still remain open.
    The only way for it to close is if the code tells it to close.

    Example.
    mysqloo.connect(host,user,pass,db,port)
    -- That will connect although no variable is assigned
    
    mysqloo.connect(host,user,pass,db,port) = nil
    -- That will connect although no variable is assigned, it is the same as above.
    
    conn = mysqloo.connect(host,user,pass,db,port)
    conn = nil
    -- That will not close the connection
    

    BTW, I did what you said and it didn't work, as I predicted.
    It must have changed, then. Before it would close with garbage collection.

    No matter, there is a database:delete() function for what you're trying to do.
    Reply With Quote Edit / Delete United States Show Events Informative Informative x 1 (list)

  34. Post #394
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    It must have changed, then. Before it would close with garbage collection.

    No matter, there is a database:delete() function for what you're trying to do.
    Really? *Checks Code*
    Reply With Quote Edit / Delete United States Show Events

  35. Post #395
    NightExcessive's Avatar
    July 2010
    20 Posts
    If you need to force deletion, you should be able to set the object to nil (it'll then get caught by Lua garbage collection). If you wish to force disconnection (and deletion) and bypass the garbage collection, then you can use Database:delete() and Query:delete().
    Broke my automerge!
    Reply With Quote Edit / Delete United States Show Events

  36. Post #396
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    According to the source code: https://github.com/andyvincent/Garry...S_Database.cpp

    There is a Database:CanDelete function, but no Delete function. Also, there is no lua access to anything regarding deletion...

    Edited:

    Broke my automerge!
    You broke mine!
    Reply With Quote Edit / Delete United States Show Events Informative Informative x 1 (list)

  37. Post #397
    NightExcessive's Avatar
    July 2010
    20 Posts
    It would seem that either the binaries or the source code is out of date, then. Either way they're obviously different. Last time I used the precompiled binaries from the OP, I was able to use a database:delete() function.
    Reply With Quote Edit / Delete United States Show Events Informative Informative x 1 (list)

  38. Post #398
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    > print( Kernel.Core.Database.Connection )...
    [Database:9CE30788]


    > Kernel.Core.Database.Connection:Delete()...
    L 04/25/2011 - 04:40:55: Lua Error: [lua_run:1] attempt to call method 'Delete' (a nil value)
    [lua_run:1] attempt to call method 'Delete' (a nil value)
    When was the last time you used the precompiled binaries? I'm using the latest...

    Edit:
    HURRR... it's :delete(), not :Delete(), and it works...
    Reply With Quote Edit / Delete United States Show Events

  39. Post #399
    NightExcessive's Avatar
    July 2010
    20 Posts
    Lowercase d on the delete. Aaaand, a few weeks ago.
    Reply With Quote Edit / Delete United States Show Events

  40. Post #400
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    Ninja'd my automerge again D:
    Reply With Quote Edit / Delete United States Show Events