Mysqloo

Post Reply
flux
New to forums
New to forums
Posts: 8
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Sun Nov 24, 2013 3:08 am

Mysqloo

Post by flux »

I look at the facepunch thread and it doesnt make much sense so I was wondering how to install it and were to put all the files
User avatar
kraze
Former staff
Former staff
Posts: 4362
Joined: Fri Sep 17, 2010 9:06 am
Location: California

Re: Mysqloo

Post by kraze »

That just needs to be placed into your servers FTP, in this directory "/garrysmod/lua/bin". We have a guide on how to connect to your servers FTP here, if you don't know how.
http://www.nfoservers.com/forums/viewto ... =24&t=8044
@Kraze^NFo> Juski has a very valid point
@Juski> Got my new signature, thanks!
@Kraze^NFo> Out of context!
@Juski> Doesn't matter!
@Juski> You said I had a valid point! You can't take it back now! It's out there!
flux
New to forums
New to forums
Posts: 8
Joined: Sun Nov 24, 2013 3:08 am

Re: Mysqloo

Post by flux »

kraze wrote:That just needs to be placed into your servers FTP, in this directory "/garrysmod/lua/bin". We have a guide on how to connect to your servers FTP here, if you don't know how.
http://www.nfoservers.com/forums/viewto ... =24&t=8044
I know how to long into ftp I am talking about which files on the mysqloo do I add

What do I do with thiis

Code: Select all

-- mysqloo table

mysqloo.connect( host, username, password [, database, port, socket, flags] )
-- returns [Database]
-- Initializes the database object, note that this does not actually connect to the database.

mysqloo.VERSION -- [Number] Current MySQLOO version
mysqloo.MYSQL_VERSION -- [Number] Current MySQL version
mysqloo.MYSQL_INFO -- [String] Fancy version string

mysqloo.DATABASE_CONNECTED -- [Number] 0 - Database is connected
mysqloo.DATABASE_CONNECTING -- [Number] 1 - Datbase is connecting
mysqloo.DATABASE_NOT_CONNECTED -- [Number] 2 - Database is not connected
mysqloo.DATABASE_INTERNAL_ERROR -- [Number] 3 - Internal error

mysqloo.QUERY_NOT_RUNNING -- [Number] 0 - Query not running
mysqloo.QUERY_RUNNING -- [Number] 1 - Query running
mysqloo.QUERY_READING_DATA -- [Number] 2 - Query is reading data
mysqloo.QUERY_COMPLETE -- [Number] 3 - Query is complete
mysqloo.QUERY_ABORTED -- [Number] 4 - Query was aborted

mysqloo.OPTION_NUMERIC_FIELDS -- [Number] 1 - ?
mysqloo.OPTION_NAMED_FIELDS -- [Number] 2 - ?
mysqloo.OPTION_INTERPRET_DATA -- [Number] 4 - ?
mysqloo.OPTION_CACHE -- [Number] 8 - ?

-- Database object

-- Functions
Database:connect()
-- Returns nothing
-- Connects to the database

Database:query( sql )
-- Returns [Query]
-- Initializes a query to the database, [String] sql is the SQL query to run.

Database:escape( str )
-- Returns [String]
-- Escapes [String] str so that it is safe to use in a query.

Database:abortAllQueries()
-- Returns nothing
-- Aborts all running queries to the database

Database:status()
-- Returns [Number] (mysqloo.DATABASE_* enums)
-- Checks the connection to the database
-- USE THIS FUNCTION CONSERVATIVELY - it forces the main thread to wait for all running queries to finish
-- If you call this before each query it will cause lag on your server!
-- Instead you should wait for a query to timeout, THEN check the connection.

Database:wait()
-- Returns nothing
-- Forces the server to wait for the connection to finish.

Database:serverVersion()
-- Returns [Number]
-- Gets the MySQL servers version

Database:serverInfo()
-- Returns [String]
-- Fancy string of the MySQL servers version

Database:hostInfo()
-- Returns [String]
-- Gets information about the connection.

-- Callbacks
Database.onConnected( db )
-- Called when the connection to the MySQL server is successful

Database.onConnectionFailed( db, err )
-- Called when the connection to the MySQL server fails, [String] err is why.

-- Query object

-- Functions
Query:start()
-- Returns nothing
-- Starts the query.

Query:isRunning()
-- Returns [Boolean]
-- True if the query is running, false if it isn't.

Query:getData()
-- Returns [Table]
-- Gets the data the query returned from the server
-- Format: { row1, row2, row3, ... }
-- Row format: { field_name = field_value }

Query:abort()
-- Returns nothing
-- Cancels the running query.

Query:lastInsert()
-- Returns [Number]
-- Gets the autoincrement index of the last inserted row.

Query:status()
-- Returns [Number] (mysqloo.QUERY_* enums)
-- Gets the status of the query.

Query:affectedRows()
-- Returns [Number]
-- Gets the number of rows the query has affected.

Query:setOption( option )
-- Returns nothing
-- Changes how the query runs/returns data (mysqloo.OPTION_* enums).

Query:wait()
-- Returns nothing
-- Forces the server to wait for the query to finish.

Query:error()
-- Returns [String]
-- Gets the error caused by the query (if any).

-- Callbacks
Query.onAborted( q )
-- Called when the query is aborted.

Query.onError( q, err, sql )
-- Called when the query errors, [String] err is the error and [String] sql is the SQL query that caused it.

Query.onSuccess( q, data )
-- Called when the query is successful, [Table] data is the data the query returned.

Query.onData( q, data )
-- Called when the query retrieves a row of data, [Table] data is the row.
and these http://puu.sh/5sCa8.png
User avatar
kraze
Former staff
Former staff
Posts: 4362
Joined: Fri Sep 17, 2010 9:06 am
Location: California

Re: Mysqloo

Post by kraze »

I would try the link in the thread for Windows. Specifically; http://drakehawke-gmod.googlecode.com/s ... _win32.dll
@Kraze^NFo> Juski has a very valid point
@Juski> Got my new signature, thanks!
@Kraze^NFo> Out of context!
@Juski> Doesn't matter!
@Juski> You said I had a valid point! You can't take it back now! It's out there!
flux
New to forums
New to forums
Posts: 8
Joined: Sun Nov 24, 2013 3:08 am

Re: Mysqloo

Post by flux »

kraze wrote:I would try the link in the thread for Windows. Specifically; http://drakehawke-gmod.googlecode.com/s ... _win32.dll
How would I edit it so it connect my mysql
User avatar
kraze
Former staff
Former staff
Posts: 4362
Joined: Fri Sep 17, 2010 9:06 am
Location: California

Re: Mysqloo

Post by kraze »

flux wrote:
kraze wrote:I would try the link in the thread for Windows. Specifically; http://drakehawke-gmod.googlecode.com/s ... _win32.dll
How would I edit it so it connect my mysql
If I remember correctly that doesn't handle connections, it just allows the functionality. Your addon/plugin would be the one handling the actual connection.
@Kraze^NFo> Juski has a very valid point
@Juski> Got my new signature, thanks!
@Kraze^NFo> Out of context!
@Juski> Doesn't matter!
@Juski> You said I had a valid point! You can't take it back now! It's out there!
flux
New to forums
New to forums
Posts: 8
Joined: Sun Nov 24, 2013 3:08 am

Re: Mysqloo

Post by flux »

kraze wrote:
flux wrote:
kraze wrote:I would try the link in the thread for Windows. Specifically; http://drakehawke-gmod.googlecode.com/s ... _win32.dll
How would I edit it so it connect my mysql
If I remember correctly that doesn't handle connections, it just allows the functionality. Your addon/plugin would be the one handling the actual connection.
alright and how would I get mysqloo to connect to my database
User avatar
kraze
Former staff
Former staff
Posts: 4362
Joined: Fri Sep 17, 2010 9:06 am
Location: California

Re: Mysqloo

Post by kraze »

That is what I mentioned above. Your addon/plugin would be the one making the connection. If it requires Mysql it would detail that and provide instructions on how to have it connect.
@Kraze^NFo> Juski has a very valid point
@Juski> Got my new signature, thanks!
@Kraze^NFo> Out of context!
@Juski> Doesn't matter!
@Juski> You said I had a valid point! You can't take it back now! It's out there!
flux
New to forums
New to forums
Posts: 8
Joined: Sun Nov 24, 2013 3:08 am

Re: Mysqloo

Post by flux »

kraze wrote:That is what I mentioned above. Your addon/plugin would be the one making the connection. If it requires Mysql it would detail that and provide instructions on how to have it connect.
oh so the addons would be the one connecting to the mysql and it needs mysqloo to connect to it
flux
New to forums
New to forums
Posts: 8
Joined: Sun Nov 24, 2013 3:08 am

Re: Mysqloo

Post by flux »

when I type rcon lua_run require([[mysqloo]])
I get
Socket connection failed (WSAEADDRNOTAVAIL)
Unable to connect to remote server (0.0.0.0:0)
User avatar
Yumiyashi
New to forums
New to forums
Posts: 9
Joined: Tue Aug 21, 2012 10:54 am

Re: Mysqloo

Post by Yumiyashi »

flux wrote:when I type rcon lua_run require([[mysqloo]])
I get
Socket connection failed (WSAEADDRNOTAVAIL)
Unable to connect to remote server (0.0.0.0:0)
(6 day old post but, eh.)
That's because you haven't defined a remote address to connect to.
Image
User avatar
kraze
Former staff
Former staff
Posts: 4362
Joined: Fri Sep 17, 2010 9:06 am
Location: California

Re: Mysqloo

Post by kraze »

flux wrote:when I type rcon lua_run require([[mysqloo]])
I get
Socket connection failed (WSAEADDRNOTAVAIL)
Unable to connect to remote server (0.0.0.0:0)
Make sure you're not using the "rcon" prefix if you're entering this command via the server control panel.
@Kraze^NFo> Juski has a very valid point
@Juski> Got my new signature, thanks!
@Kraze^NFo> Out of context!
@Juski> Doesn't matter!
@Juski> You said I had a valid point! You can't take it back now! It's out there!
Post Reply