[Standalone] OxMySQL - Lightweight MySQL wrapper

Idea: compatibility resource using ‘provide’ to offer a mysql-async style Lua file for user resources to use this without change.

8 Likes

Finally got around to converting our server to use this MySQL wrapper over the weekend and it’s been pretty much smooth sailing. It’s nice to see a resource which is updated on demand, little things like backwards compatabilty use of @ and more recently being able to use a different MySQL port are a nice touch.

1 Like

:airplane: well done.

1 Like

Good luck with your idea, I came up with the idea of ​​just validating the queries with no space after the comma so this causes an error, they just responded with paper-cut garbage!

Taking several errors in CreateTable, AlterTable or in multi-queries with ; that I won’t even pass on ideas and corrections to people as insignificant as them!

Space after comma was already fixed by editing regex in named-placeholders. Available from latest release 1.4.1

1 Like

is this ready for product version ? im really looking forward to use this for product version

You kept responding with garbage like “it’s too hard to write a decent query”. mysql-async support will come eventually, but this was never supposed to be a replace-all project.

1 Like

The coolest thing is you send a trash to my post! Saying that I would NEVER do this… and 5 days later another developer did it, because he saw it made sense…

Unlike you, other developers are committed to the project…

You’re just that garbage you sent my isue!

Thanks to @Dunak for the amazing service he is doing. I think the only mistake is having someone like @Linden on the team!

Don´t talk about Linden like that. I wasn´t aware of regex mistake and he wasn´t too. He was just discussing drag & drop replacement that we did not plan this resource to be like this. Anyway as it my project I take responsibility for actions and Linden with other contributors are helping me to maintain this resource.

Just for info, yes as he said we are preparing mysql-async wrapper with some even better nil checks soon as I will have more free time. Will come in 1.5.

4 Likes

Of course test your queries in resource before but QBCore is currently running this in production.

1 Like

I didn’t say never, I said it wasn’t a concern. Your reasoning for the issue needing to be fixed was as flawed as the queries being used, which do not fully utilise the resource in the intended way. Surely you can understand my frustration at you ignoring my advice given days prior telling you how to resolve the problem you were experiencing.

  • Added support for legacy connection strings (semicolon separated values)
  • Added lib/MySQL.lua for including with resources (server_script '@oxmysql/lib/MySQL.lua)

The mysql-async style import file is mostly untested but should function as expected.

We don’t use store, so the included function simply stores it to a local table; no real benefit aside from maintaining compatibility.

1 Like

Having some trouble with it. It errors out every export i’m trying to use from it.image

LOG on server start :

e[38;5;42m[      script:oxmysql] e[0me[0m raw: 0a352e352e352d31302e332e33312d4d6172696144422d313a31302e332e33312b6d617269617e62696f6e696300800e02004154626e266c717100fef72d0200bf811500000000000007000000627856244f4035265d264050006d7973716c5f6e61746976655f70617373776f726400
e[38;5;42m[      script:oxmysql] e[0me[0mTrace: undefined
e[38;5;42m[      script:oxmysql] e[0me[0m    at Console.trace (citizen:/scripting/v8/console.js:297:19)
e[38;5;42m[      script:oxmysql] e[0me[0m    at s.handlePacket (@oxmysql/oxmysql.js:1:112014)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.onPacket (@oxmysql/oxmysql.js:1:107060)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.executeStart (@oxmysql/oxmysql.js:1:271253)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.<anonymous> (@oxmysql/oxmysql.js:1:107208)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.emit (events.js:210:5)
e[38;5;42m[      script:oxmysql] e[0me[0m    at addChunk (_stream_readable.js:308:12)
e[38;5;42m[      script:oxmysql] e[0me[0m    at readableAddChunk (_stream_readable.js:289:11)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.Readable.push (_stream_readable.js:223:10)
e[38;5;42m[      script:oxmysql] e[0me[0m    at TCP.onStreamRead (internal/stream_base_commons.js:182:23)
e[38;5;42m[      script:oxmysql] e[0me[0m0 undefined ==> o#unknown name(0,,116)
e[38;5;42m[      script:oxmysql] e[0me[0mServer hello packet: capability flags:2176841726=(found rows, long flag, connect with db, no schema, compress, odbc, local files, ignore space, protocol 41, interactive, ignore sigpipe, transactions, reserved, secure connection, multi statements, multi results, ps multi results, plugin auth, connect attrs, plugin auth lenenc client data, session track, deprecate eof, remember options)
e[38;5;42m[      script:oxmysql] e[0me[0mSending handshake packet: flags:11203535=(long password, found rows, long flag, connect with db, odbc, local files, ignore space, protocol 41, ignore sigpipe, transactions, reserved, secure connection, multi results, plugin auth, plugin auth lenenc client data, session track)
e[38;5;42m[      script:oxmysql] e[0me[0m0 134784 <== o#unknown name(1,,103)
e[38;5;42m[      script:oxmysql] e[0me[0m0 134784 <== 63000001cff3aa00000000002d000000000000000000000000000000000000000000000066706c6179745f666976656d0014b329a2c35ad44b8e28e022c3dc0077b9b515481f66706c6179745f646576006d7973716c5f6e61746976655f70617373776f726400
e[38;5;42m[      script:oxmysql] e[0me[0m raw: 0a352e352e352d31302e332e33312d4d6172696144422d313a31302e332e33312b6d617269617e62696f6e696300810e02005123576e4343665800fef72d0200bf811500000000000007000000677a536c4a684d2b2e455147006d7973716c5f6e61746976655f70617373776f726400
e[38;5;42m[      script:oxmysql] e[0me[0mTrace: undefined
e[38;5;42m[      script:oxmysql] e[0me[0m    at Console.trace (citizen:/scripting/v8/console.js:297:19)
e[38;5;42m[      script:oxmysql] e[0me[0m    at s.handlePacket (@oxmysql/oxmysql.js:1:112014)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.onPacket (@oxmysql/oxmysql.js:1:107060)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.executeStart (@oxmysql/oxmysql.js:1:271253)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.<anonymous> (@oxmysql/oxmysql.js:1:107208)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.emit (events.js:210:5)
e[38;5;42m[      script:oxmysql] e[0me[0m    at addChunk (_stream_readable.js:308:12)
e[38;5;42m[      script:oxmysql] e[0me[0m    at readableAddChunk (_stream_readable.js:289:11)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.Readable.push (_stream_readable.js:223:10)
e[38;5;42m[      script:oxmysql] e[0me[0m    at TCP.onStreamRead (internal/stream_base_commons.js:182:23)
e[38;5;42m[      script:oxmysql] e[0me[0m1 undefined ==> o#unknown name(0,,116)
e[38;5;42m[      script:oxmysql] e[0me[0mServer hello packet: capability flags:2176841726=(found rows, long flag, connect with db, no schema, compress, odbc, local files, ignore space, protocol 41, interactive, ignore sigpipe, transactions, reserved, secure connection, multi statements, multi results, ps multi results, plugin auth, connect attrs, plugin auth lenenc client data, session track, deprecate eof, remember options)
e[38;5;42m[      script:oxmysql] e[0me[0mSending handshake packet: flags:11203535=(long password, found rows, long flag, connect with db, odbc, local files, ignore space, protocol 41, ignore sigpipe, transactions, reserved, secure connection, multi results, plugin auth, plugin auth lenenc client data, session track)
e[38;5;42m[      script:oxmysql] e[0me[0m1 134785 <== o#unknown name(1,,103)
e[38;5;42m[      script:oxmysql] e[0me[0m1 134785 <== 63000001cff3aa00000000002d000000000000000000000000000000000000000000000066706c6179745f666976656d001450f10411317de63febadd69064b3f3791ccbbb1866706c6179745f646576006d7973716c5f6e61746976655f70617373776f726400
e[38;5;42m[      script:oxmysql] e[0me[0m raw: 00000002400000000d010b0a66706c6179745f646576
e[38;5;42m[      script:oxmysql] e[0me[0mTrace: undefined
e[38;5;42m[      script:oxmysql] e[0me[0m    at Console.trace (citizen:/scripting/v8/console.js:297:19)
e[38;5;42m[      script:oxmysql] e[0me[0m    at s.handlePacket (@oxmysql/oxmysql.js:1:112014)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.onPacket (@oxmysql/oxmysql.js:1:107060)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.executeStart (@oxmysql/oxmysql.js:1:271253)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.<anonymous> (@oxmysql/oxmysql.js:1:107208)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.emit (events.js:210:5)
e[38;5;42m[      script:oxmysql] e[0me[0m    at addChunk (_stream_readable.js:308:12)
e[38;5;42m[      script:oxmysql] e[0me[0m    at readableAddChunk (_stream_readable.js:289:11)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.Readable.push (_stream_readable.js:223:10)
e[38;5;42m[      script:oxmysql] e[0me[0m    at TCP.onStreamRead (internal/stream_base_commons.js:182:23)
e[38;5;42m[      script:oxmysql] e[0me[0m0 134784 ==> o#unknown name(2,maybeOK,26)
e[38;5;42m[      script:oxmysql] e[0me[0mAdd command: c
e[38;5;42m[      script:oxmysql] e[0me[0m        Sending query command: SELECT 1
e[38;5;42m[      script:oxmysql] e[0me[0m0 134784 <== c#unknown name(0,,13)
e[38;5;42m[      script:oxmysql] e[0me[0m0 134784 <== 090000000353454c4543542031
e[38;5;42m[      script:oxmysql] e[0me[0m raw: 00000002400000000d010b0a66706c6179745f646576
e[38;5;42m[      script:oxmysql] e[0me[0mTrace: undefined
e[38;5;42m[      script:oxmysql] e[0me[0m    at Console.trace (citizen:/scripting/v8/console.js:297:19)
e[38;5;42m[      script:oxmysql] e[0me[0m    at s.handlePacket (@oxmysql/oxmysql.js:1:112014)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.onPacket (@oxmysql/oxmysql.js:1:107060)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.executeStart (@oxmysql/oxmysql.js:1:271253)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.<anonymous> (@oxmysql/oxmysql.js:1:107208)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.emit (events.js:210:5)
e[38;5;42m[      script:oxmysql] e[0me[0m    at addChunk (_stream_readable.js:308:12)
e[38;5;42m[      script:oxmysql] e[0me[0m    at readableAddChunk (_stream_readable.js:289:11)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.Readable.push (_stream_readable.js:223:10)
e[38;5;42m[      script:oxmysql] e[0me[0m    at TCP.onStreamRead (internal/stream_base_commons.js:182:23)
e[38;5;42m[      script:oxmysql] e[0me[0m1 134785 ==> o#unknown name(2,maybeOK,26)
e[38;5;42m[      script:oxmysql] e[0me[0mAdd command: c
e[38;5;42m[      script:oxmysql] e[0me[0m        Sending query command: CREATE TABLE IF NOT EXISTS vrp_login_users(
e[38;5;42m[      script:oxmysql] e[0me[0m  user_id INTEGER,
e[38;5;42m[      script:oxmysql] e[0me[0m  whitelisted BOOLEAN,
e[38;5;42m[      script:oxmysql] e[0me[0m  ban_end INTEGER,
e[38;5;42m[      script:oxmysql] e[0me[0m  ban_reason TEXT,
e[38;5;42m[      script:oxmysql] e[0me[0m  CONSTRAINT pk_login_users PRIMARY KEY(user_id),
e[38;5;42m[      script:oxmysql] e[0me[0m  CONSTRAINT fk_login_users_vrp FOREIGN KEY(user_id) REFERENCES vrp_users(id) ON DELETE CASCADE
e[38;5;42m[      script:oxmysql] e[0me[0m);
e[38;5;42m[      script:oxmysql] e[0me[0m  
e[38;5;42m[      script:oxmysql] e[0me[0m1 134785 <== c#unknown name(0,,280)
e[38;5;42m[      script:oxmysql] e[0me[0m1 134785 <== 1401000003435245415445205441424c45204946204e4f5420455849535453207672705f6c6f67696e5f7573657273280a2020757365725f696420494e54454745522c0a202077686974656c697374656420424f4f4c45414e2c0a202062616e5f656e6420494e54454745522c0a202062616e5f726561736f6e20544558542c0a2020434f4e53545241494e5420706b5f6c6f67696e5f7573657273205052494d415259204b455928757365725f6964292c0a2020434f4e53545241494e5420666b5f6c6f67696e5f75736572735f76727020464f524549474e204b455928757365725f696429205245464552454e434553207672705f757365727328696429204f4e2044454c45544520434153434144450a293b0a2020
e[38;5;42m[      script:oxmysql] e[0me[0m raw: 0117000002
e[38;5;42m[      script:oxmysql] e[0me[0mTrace: undefined
e[38;5;42m[      script:oxmysql] e[0me[0m    at Console.trace (citizen:/scripting/v8/console.js:297:19)
e[38;5;42m[      script:oxmysql] e[0me[0m    at s.handlePacket (@oxmysql/oxmysql.js:1:112014)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.onPacket (@oxmysql/oxmysql.js:1:107060)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.executeStart (@oxmysql/oxmysql.js:1:271253)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.<anonymous> (@oxmysql/oxmysql.js:1:107208)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.emit (events.js:210:5)
e[38;5;42m[      script:oxmysql] e[0me[0m    at addChunk (_stream_readable.js:308:12)
e[38;5;42m[      script:oxmysql] e[0me[0m    at readableAddChunk (_stream_readable.js:289:11)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.Readable.push (_stream_readable.js:223:10)
e[38;5;42m[      script:oxmysql] e[0me[0m    at TCP.onStreamRead (internal/stream_base_commons.js:182:23)
e[38;5;42m[      script:oxmysql] e[0me[0m0 134784 ==> c#unknown name(1,,5)
e[38;5;42m[      script:oxmysql] e[0me[0m        Resultset header received, expecting 1 column definition packets
e[38;5;42m[      script:oxmysql] e[0me[0m raw: 036465660000000131000c3f000100000003810000000005000003
e[38;5;42m[      script:oxmysql] e[0me[0mTrace: undefined
e[38;5;42m[      script:oxmysql] e[0me[0m    at Console.trace (citizen:/scripting/v8/console.js:297:19)
e[38;5;42m[      script:oxmysql] e[0me[0m    at s.handlePacket (@oxmysql/oxmysql.js:1:112014)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.onPacket (@oxmysql/oxmysql.js:1:107060)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.executeStart (@oxmysql/oxmysql.js:1:271253)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.<anonymous> (@oxmysql/oxmysql.js:1:107208)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.emit (events.js:210:5)
e[38;5;42m[      script:oxmysql] e[0me[0m    at addChunk (_stream_readable.js:308:12)
e[38;5;42m[      script:oxmysql] e[0me[0m    at readableAddChunk (_stream_readable.js:289:11)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.Readable.push (_stream_readable.js:223:10)
e[38;5;42m[      script:oxmysql] e[0me[0m    at TCP.onStreamRead (internal/stream_base_commons.js:182:23)
e[38;5;42m[      script:oxmysql] e[0me[0m0 134784 ==> c#unknown name(2,,27)
e[38;5;42m[      script:oxmysql] e[0me[0m        Column definition:
e[38;5;42m[      script:oxmysql] e[0me[0m          name: 1
e[38;5;42m[      script:oxmysql] e[0me[0m          type: 3
e[38;5;42m[      script:oxmysql] e[0me[0m         flags: 129
e[38;5;42m[      script:oxmysql] e[0me[0m
e[38;5;42m[      script:oxmysql] e[0me[0m
e[38;5;42m[      script:oxmysql] e[0me[0mCompiled text protocol row parser:
e[38;5;42m[      script:oxmysql] e[0me[0m
e[38;5;42m[      script:oxmysql] e[0me[0mFor nicer debug output consider install cardinal@e[32m.0.0
e[38;5;42m[      script:oxmysql] e[0me[32m(function () {
e[38;5;42m[      script:oxmysql] e[0me[32m  return function TextRow(packet, fields, options, CharsetToEncoding) {
e[38;5;42m[      script:oxmysql] e[0me[32m    const wrap = function(e,t,n,E){return{type:t,length:e.columnLength,db:e.schema,table:e.table,name:e.name,string:function(){return n.readLengthCodedString(E)},buffer:function(){return n.readLengthCodedBuffer()},geometry:function(){return n.parseGeometryValue()}}}
e[38;5;42m[      script:oxmysql] e[0me[32m    // "1": LONG
e[38;5;42m[      script:oxmysql] e[0me[32m    this["1"] = options.typeCast(wrap(fields[0], "LONG", packet, CharsetToEncoding[fields[0].characterSet]), function() { return packet.parseLengthCodedIntNoBigCheck();})
e[38;5;42m[      script:oxmysql] e[0me[32m  };
e[38;5;42m[      script:oxmysql] e[0me[32m})()
e[38;5;42m[      script:oxmysql] e[0me[32m
e[38;5;42m[      script:oxmysql] e[0me[32m raw: fe0000020002000004
e[38;5;42m[      script:oxmysql] e[0me[32mTrace: undefined
e[38;5;42m[      script:oxmysql] e[0me[32m    at Console.trace (citizen:/scripting/v8/console.js:297:19)
e[38;5;42m[      script:oxmysql] e[0me[32m    at s.handlePacket (@oxmysql/oxmysql.js:1:112014)
e[38;5;42m[      script:oxmysql] e[0me[32m    at i.onPacket (@oxmysql/oxmysql.js:1:107060)
e[38;5;42m[      script:oxmysql] e[0me[32m    at i.executeStart (@oxmysql/oxmysql.js:1:271253)
e[38;5;42m[      script:oxmysql] e[0me[32m    at Socket.<anonymous> (@oxmysql/oxmysql.js:1:107208)
e[38;5;42m[      script:oxmysql] e[0me[32m    at Socket.emit (events.js:210:5)
e[38;5;42m[      script:oxmysql] e[0me[32m    at addChunk (_stream_readable.js:308:12)
e[38;5;42m[      script:oxmysql] e[0me[32m    at readableAddChunk (_stream_readable.js:289:11)
e[38;5;42m[      script:oxmysql] e[0me[32m    at Socket.Readable.push (_stream_readable.js:223:10)
e[38;5;42m[      script:oxmysql] e[0me[32m    at TCP.onStreamRead (internal/stream_base_commons.js:182:23)
e[38;5;42m[      script:oxmysql] e[0me[32m0 134784 ==> c#unknown name(3,EOF,9)
e[38;5;42m[      script:oxmysql] e[0me[32m raw: 013105000005
e[38;5;42m[      script:oxmysql] e[0me[32mTrace: undefined
e[38;5;42m[      script:oxmysql] e[0me[32m    at Console.trace (citizen:/scripting/v8/console.js:297:19)
e[38;5;42m[      script:oxmysql] e[0me[32m    at s.handlePacket (@oxmysql/oxmysql.js:1:112014)
e[38;5;42m[      script:oxmysql] e[0me[32m    at i.onPacket (@oxmysql/oxmysql.js:1:107060)
e[38;5;42m[      script:oxmysql] e[0me[32m    at i.executeStart (@oxmysql/oxmysql.js:1:271253)
e[38;5;42m[      script:oxmysql] e[0me[32m    at Socket.<anonymous> (@oxmysql/oxmysql.js:1:107208)
e[38;5;42m[      script:oxmysql] e[0me[32m    at Socket.emit (events.js:210:5)
e[38;5;42m[      script:oxmysql] e[0me[32m    at addChunk (_stream_readable.js:308:12)
e[38;5;42m[      script:oxmysql] e[0me[32m    at readableAddChunk (_stream_readable.js:289:11)
e[38;5;42m[      script:oxmysql] e[0me[32m    at Socket.Readable.push (_stream_readable.js:223:10)
e[38;5;42m[      script:oxmysql] e[0me[32m    at TCP.onStreamRead (internal/stream_base_commons.js:182:23)
e[38;5;42m[      script:oxmysql] e[0me[32m0 134784 ==> c#unknown name(4,,6)
e[38;5;42m[      script:oxmysql] e[0me[32m raw: fe00000200
e[38;5;42m[      script:oxmysql] e[0me[32mTrace: undefined
e[38;5;42m[      script:oxmysql] e[0me[32m    at Console.trace (citizen:/scripting/v8/console.js:297:19)
e[38;5;42m[      script:oxmysql] e[0me[32m    at s.handlePacket (@oxmysql/oxmysql.js:1:112014)
e[38;5;42m[      script:oxmysql] e[0me[32m    at i.onPacket (@oxmysql/oxmysql.js:1:107060)
e[38;5;42m[      script:oxmysql] e[0me[32m    at i.executeStart (@oxmysql/oxmysql.js:1:271253)
e[38;5;42m[      script:oxmysql] e[0me[32m    at Socket.<anonymous> (@oxmysql/oxmysql.js:1:107208)
e[38;5;42m[      script:oxmysql] e[0me[32m    at Socket.emit (events.js:210:5)
e[38;5;42m[      script:oxmysql] e[0me[32m    at addChunk (_stream_readable.js:308:12)
e[38;5;42m[      script:oxmysql] e[0me[32m    at readableAddChunk (_stream_readable.js:289:11)
e[38;5;42m[      script:oxmysql] e[0me[32m    at Socket.Readable.push (_stream_readable.js:223:10)
e[38;5;42m[      script:oxmysql] e[0me[32m    at TCP.onStreamRead (internal/stream_base_commons.js:182:23)
e[38;5;42m[      script:oxmysql] e[0me[32m0 134784 ==> c#unknown name(5,EOF,9)
e[38;5;142m[          script:vrp] e[0me[32masd
e[38;5;42m[      script:oxmysql] e[0me[32m raw: 00000002000100
e[38;5;42m[      script:oxmysql] e[0me[32mTrace: undefined
e[38;5;42m[      script:oxmysql] e[0me[32m    at Console.trace (citizen:/scripting/v8/console.js:297:19)
e[38;5;42m[      script:oxmysql] e[0me[32m    at s.handlePacket (@oxmysql/oxmysql.js:1:112014)
e[38;5;42m[      script:oxmysql] e[0me[32m    at i.onPacket (@oxmysql/oxmysql.js:1:107060)
e[38;5;42m[      script:oxmysql] e[0me[32m    at i.executeStart (@oxmysql/oxmysql.js:1:271253)
e[38;5;42m[      script:oxmysql] e[0me[32m    at Socket.<anonymous> (@oxmysql/oxmysql.js:1:107208)
e[38;5;42m[      script:oxmysql] e[0me[32m    at Socket.emit (events.js:210:5)
e[38;5;42m[      script:oxmysql] e[0me[32m    at addChunk (_stream_readable.js:308:12)
e[38;5;42m[      script:oxmysql] e[0me[32m    at readableAddChunk (_stream_readable.js:289:11)
e[38;5;42m[      script:oxmysql] e[0me[32m    at Socket.Readable.push (_stream_readable.js:223:10)
e[38;5;42m[      script:oxmysql] e[0me[32m    at TCP.onStreamRead (internal/stream_base_commons.js:182:23)
e[38;5;42m[      script:oxmysql] e[0me[32m1 134785 ==> c#unknown name(1,maybeOK,11)
e[38;5;42m[      script:oxmysql] e[0me[32m        Resultset header received, expecting 0 column definition packets
e[38;5;154m[   script:mapmanager] e[0me[32mStarted map fivem-map-hipster
e[38;5;73m[ citizen-server-impl] e[0me[32mStarted resource fivem-map-hipster
e[38;5;42m[      script:oxmysql] e[0me[32mAdd command: c
e[38;5;42m[      script:oxmysql] e[0me[32m        Sending query command: SET TRANSACTION ISOLATION LEVEL READ COMMITTED
e[38;5;42m[      script:oxmysql] e[0me[32m0 134784 <== c#unknown name(0,,51)
e[38;5;42m[      script:oxmysql] e[0me[32m0 134784 <== 2f00000003534554205452414e53414354494f4e2049534f4c4154494f4e204c4556454c205245414420434f4d4d4954544544
e[38;5;42m[      script:oxmysql] e[0me[32m raw: 00000002000000
e[38;5;42m[      script:oxmysql] e[0me[32mTrace: undefined
e[38;5;42m[      script:oxmysql] e[0me[32m    at Console.trace (citizen:/scripting/v8/console.js:297:19)
e[38;5;42m[      script:oxmysql] e[0me[32m    at s.handlePacket (@oxmysql/oxmysql.js:1:112014)
e[38;5;42m[      script:oxmysql] e[0me[32m    at i.onPacket (@oxmysql/oxmysql.js:1:107060)
e[38;5;42m[      script:oxmysql] e[0me[32m    at i.executeStart (@oxmysql/oxmysql.js:1:271253)
e[38;5;42m[      script:oxmysql] e[0me[32m    at Socket.<anonymous> (@oxmysql/oxmysql.js:1:107208)
e[38;5;42m[      script:oxmysql] e[0me[32m    at Socket.emit (events.js:210:5)
e[38;5;42m[      script:oxmysql] e[0me[32m    at addChunk (_stream_readable.js:308:12)
e[38;5;42m[      script:oxmysql] e[0me[32m    at readableAddChunk (_stream_readable.js:289:11)
e[38;5;42m[      script:oxmysql] e[0me[32m    at Socket.Readable.push (_stream_readable.js:223:10)
e[38;5;42m[      script:oxmysql] e[0me[32m    at TCP.onStreamRead (internal/stream_base_commons.js:182:23)
e[38;5;42m[      script:oxmysql] e[0me[32m0 134784 ==> c#unknown name(1,maybeOK,11)
e[38;5;42m[      script:oxmysql] e[0me[32m        Resultset header received, expecting 0 column definition packets
e[38;5;42m[      script:oxmysql] e[0me[32me[32mDatabase server connection established!e[97m
e[38;5;66m[          svadhesive] e[0me[97mServer license key authentication succeeded. Welcome!
e[38;5;73m[ citizen-server-impl] e[0me[97me[91m        fff                          
e[38;5;73m[ citizen-server-impl] e[0me[91me[91m  cccc ff   xx  xx     rr rr    eee  
e[38;5;73m[ citizen-server-impl] e[0me[91me[91mcc     ffff   xx       rrr  r ee   e 
e[38;5;73m[ citizen-server-impl] e[0me[91me[91mcc     ff     xx   ... rr     eeeee  
e[38;5;73m[ citizen-server-impl] e[0me[91me[91m ccccc ff   xx  xx ... rr      eeeee 
e[38;5;73m[ citizen-server-impl] e[0me[91m                                     e[0m

Weird i get this though

 script:oxmysql] e[0me[32me[32mDatabase server connection established!e[97m

For example when i connect to the server and i have to check my identifiers from DB, the error is this one :

[38;5;42m[      script:oxmysql] e[0me[0mAdd command: c
e[38;5;42m[      script:oxmysql] e[0me[0m        Sending query command: SELECT user_id FROM vrp_user_ids WHERE identifier = 'license:a2e9c693b20db65d6f326411f8423e06535ae745'
e[38;5;42m[      script:oxmysql] e[0me[0m1 134826 <== c#unknown name(0,,107)
e[38;5;42m[      script:oxmysql] e[0me[0m1 134826 <== 670000000353454c45435420757365725f69642046524f4d207672705f757365725f696473205748455245206964656e746966696572203d20276c6963656e73653a6132653963363933623230646236356436663332363431316638343233653036353335616537343527
e[38;5;42m[      script:oxmysql] e[0me[0m raw: 0146000002
e[38;5;42m[      script:oxmysql] e[0me[0mTrace: undefined
e[38;5;42m[      script:oxmysql] e[0me[0m    at Console.trace (citizen:/scripting/v8/console.js:297:19)
e[38;5;42m[      script:oxmysql] e[0me[0m    at s.handlePacket (@oxmysql/oxmysql.js:1:112014)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.onPacket (@oxmysql/oxmysql.js:1:107060)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.executeStart (@oxmysql/oxmysql.js:1:271253)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.<anonymous> (@oxmysql/oxmysql.js:1:107208)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.emit (events.js:210:5)
e[38;5;42m[      script:oxmysql] e[0me[0m    at addChunk (_stream_readable.js:308:12)
e[38;5;42m[      script:oxmysql] e[0me[0m    at readableAddChunk (_stream_readable.js:289:11)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.Readable.push (_stream_readable.js:223:10)
e[38;5;42m[      script:oxmysql] e[0me[0m    at TCP.onStreamRead (internal/stream_base_commons.js:182:23)
e[38;5;42m[      script:oxmysql] e[0me[0m1 134826 ==> c#unknown name(1,,5)
e[38;5;42m[      script:oxmysql] e[0me[0m        Resultset header received, expecting 1 column definition packets
e[38;5;42m[      script:oxmysql] e[0me[0m raw: 036465660a66706c6179745f6465760c7672705f757365725f6964730c7672705f757365725f69647307757365725f696407757365725f69640c3f000b00000003084000000005000003
e[38;5;42m[      script:oxmysql] e[0me[0mTrace: undefined
e[38;5;42m[      script:oxmysql] e[0me[0m    at Console.trace (citizen:/scripting/v8/console.js:297:19)
e[38;5;42m[      script:oxmysql] e[0me[0m    at s.handlePacket (@oxmysql/oxmysql.js:1:112014)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.onPacket (@oxmysql/oxmysql.js:1:107060)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.executeStart (@oxmysql/oxmysql.js:1:271253)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.<anonymous> (@oxmysql/oxmysql.js:1:107208)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.emit (events.js:210:5)
e[38;5;42m[      script:oxmysql] e[0me[0m    at addChunk (_stream_readable.js:308:12)
e[38;5;42m[      script:oxmysql] e[0me[0m    at readableAddChunk (_stream_readable.js:289:11)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.Readable.push (_stream_readable.js:223:10)
e[38;5;42m[      script:oxmysql] e[0me[0m    at TCP.onStreamRead (internal/stream_base_commons.js:182:23)
e[38;5;42m[      script:oxmysql] e[0me[0m1 134826 ==> c#unknown name(2,,74)
e[38;5;42m[      script:oxmysql] e[0me[0m        Column definition:
e[38;5;42m[      script:oxmysql] e[0me[0m          name: user_id
e[38;5;42m[      script:oxmysql] e[0me[0m          type: 3
e[38;5;42m[      script:oxmysql] e[0me[0m         flags: 16392
e[38;5;42m[      script:oxmysql] e[0me[0m
e[38;5;42m[      script:oxmysql] e[0me[0m
e[38;5;42m[      script:oxmysql] e[0me[0mCompiled text protocol row parser:
e[38;5;42m[      script:oxmysql] e[0me[0m
e[38;5;42m[      script:oxmysql] e[0me[0m(function () {
e[38;5;42m[      script:oxmysql] e[0me[0m  return function TextRow(packet, fields, options, CharsetToEncoding) {
e[38;5;42m[      script:oxmysql] e[0me[0m    const wrap = function(e,t,n,E){return{type:t,length:e.columnLength,db:e.schema,table:e.table,name:e.name,string:function(){return n.readLengthCodedString(E)},buffer:function(){return n.readLengthCodedBuffer()},geometry:function(){return n.parseGeometryValue()}}}
e[38;5;42m[      script:oxmysql] e[0me[0m    // "user_id": LONG
e[38;5;42m[      script:oxmysql] e[0me[0m    this["user_id"] = options.typeCast(wrap(fields[0], "LONG", packet, CharsetToEncoding[fields[0].characterSet]), function() { return packet.parseLengthCodedIntNoBigCheck();})
e[38;5;42m[      script:oxmysql] e[0me[0m  };
e[38;5;42m[      script:oxmysql] e[0me[0m})()
e[38;5;42m[      script:oxmysql] e[0me[0m
e[38;5;42m[      script:oxmysql] e[0me[0m raw: fe0000020002000004
e[38;5;42m[      script:oxmysql] e[0me[0mTrace: undefined
e[38;5;42m[      script:oxmysql] e[0me[0m    at Console.trace (citizen:/scripting/v8/console.js:297:19)
e[38;5;42m[      script:oxmysql] e[0me[0m    at s.handlePacket (@oxmysql/oxmysql.js:1:112014)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.onPacket (@oxmysql/oxmysql.js:1:107060)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.executeStart (@oxmysql/oxmysql.js:1:271253)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.<anonymous> (@oxmysql/oxmysql.js:1:107208)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.emit (events.js:210:5)
e[38;5;42m[      script:oxmysql] e[0me[0m    at addChunk (_stream_readable.js:308:12)
e[38;5;42m[      script:oxmysql] e[0me[0m    at readableAddChunk (_stream_readable.js:289:11)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.Readable.push (_stream_readable.js:223:10)
e[38;5;42m[      script:oxmysql] e[0me[0m    at TCP.onStreamRead (internal/stream_base_commons.js:182:23)
e[38;5;42m[      script:oxmysql] e[0me[0m1 134826 ==> c#unknown name(3,EOF,9)
e[38;5;42m[      script:oxmysql] e[0me[0m raw: 013405000005
e[38;5;42m[      script:oxmysql] e[0me[0mTrace: undefined
e[38;5;42m[      script:oxmysql] e[0me[0m    at Console.trace (citizen:/scripting/v8/console.js:297:19)
e[38;5;42m[      script:oxmysql] e[0me[0m    at s.handlePacket (@oxmysql/oxmysql.js:1:112014)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.onPacket (@oxmysql/oxmysql.js:1:107060)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.executeStart (@oxmysql/oxmysql.js:1:271253)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.<anonymous> (@oxmysql/oxmysql.js:1:107208)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.emit (events.js:210:5)
e[38;5;42m[      script:oxmysql] e[0me[0m    at addChunk (_stream_readable.js:308:12)
e[38;5;42m[      script:oxmysql] e[0me[0m    at readableAddChunk (_stream_readable.js:289:11)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.Readable.push (_stream_readable.js:223:10)
e[38;5;42m[      script:oxmysql] e[0me[0m    at TCP.onStreamRead (internal/stream_base_commons.js:182:23)
e[38;5;42m[      script:oxmysql] e[0me[0m1 134826 ==> c#unknown name(4,,6)
e[38;5;42m[      script:oxmysql] e[0me[0m raw: fe00000200
e[38;5;42m[      script:oxmysql] e[0me[0mTrace: undefined
e[38;5;42m[      script:oxmysql] e[0me[0m    at Console.trace (citizen:/scripting/v8/console.js:297:19)
e[38;5;42m[      script:oxmysql] e[0me[0m    at s.handlePacket (@oxmysql/oxmysql.js:1:112014)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.onPacket (@oxmysql/oxmysql.js:1:107060)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.executeStart (@oxmysql/oxmysql.js:1:271253)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.<anonymous> (@oxmysql/oxmysql.js:1:107208)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.emit (events.js:210:5)
e[38;5;42m[      script:oxmysql] e[0me[0m    at addChunk (_stream_readable.js:308:12)
e[38;5;42m[      script:oxmysql] e[0me[0m    at readableAddChunk (_stream_readable.js:289:11)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.Readable.push (_stream_readable.js:223:10)
e[38;5;42m[      script:oxmysql] e[0me[0m    at TCP.onStreamRead (internal/stream_base_commons.js:182:23)
e[38;5;42m[      script:oxmysql] e[0me[0m1 134826 ==> c#unknown name(5,EOF,9)

UPDATE : Started the server with only oxmysql on it.

e[38;5;42m[      script:oxmysql] e[0me[0mAdd command: o
e[38;5;42m[      script:oxmysql] e[0me[0m raw: 0a352e352e352d31302e332e33312d4d6172696144422d313a31302e332e33312b6d617269617e62696f6e696300460f020033474a226453542d00fef72d0200bf8115000000000000070000002365565f5b2c653b353a6058006d7973716c5f6e61746976655f70617373776f726400
e[38;5;42m[      script:oxmysql] e[0me[0mTrace: undefined
e[38;5;42m[      script:oxmysql] e[0me[0m    at Console.trace (citizen:/scripting/v8/console.js:297:19)
e[38;5;42m[      script:oxmysql] e[0me[0m    at s.handlePacket (@oxmysql/oxmysql.js:1:112014)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.onPacket (@oxmysql/oxmysql.js:1:107060)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.executeStart (@oxmysql/oxmysql.js:1:271253)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.<anonymous> (@oxmysql/oxmysql.js:1:107208)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.emit (events.js:210:5)
e[38;5;42m[      script:oxmysql] e[0me[0m    at addChunk (_stream_readable.js:308:12)
e[38;5;42m[      script:oxmysql] e[0me[0m    at readableAddChunk (_stream_readable.js:289:11)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.Readable.push (_stream_readable.js:223:10)
e[38;5;42m[      script:oxmysql] e[0me[0m    at TCP.onStreamRead (internal/stream_base_commons.js:182:23)
e[38;5;42m[      script:oxmysql] e[0me[0m0 undefined ==> o#unknown name(0,,116)
e[38;5;42m[      script:oxmysql] e[0me[0mServer hello packet: capability flags:2176841726=(found rows, long flag, connect with db, no schema, compress, odbc, local files, ignore space, protocol 41, interactive, ignore sigpipe, transactions, reserved, secure connection, multi statements, multi results, ps multi results, plugin auth, connect attrs, plugin auth lenenc client data, session track, deprecate eof, remember options)
e[38;5;42m[      script:oxmysql] e[0me[0mSending handshake packet: flags:11203535=(long password, found rows, long flag, connect with db, odbc, local files, ignore space, protocol 41, ignore sigpipe, transactions, reserved, secure connection, multi results, plugin auth, plugin auth lenenc client data, session track)
e[38;5;42m[      script:oxmysql] e[0me[0m0 134982 <== o#unknown name(1,,103)
e[38;5;42m[      script:oxmysql] e[0me[0m0 134982 <== 63000001cff3aa00000000002d000000000000000000000000000000000000000000000066706c6179745f666976656d0014d73654b0f435d2ea7e3cfd8f21dccbe6fa5bdf3866706c6179745f646576006d7973716c5f6e61746976655f70617373776f726400
e[38;5;42m[      script:oxmysql] e[0me[0m raw: 00000002400000000d010b0a66706c6179745f646576
e[38;5;42m[      script:oxmysql] e[0me[0mTrace: undefined
e[38;5;42m[      script:oxmysql] e[0me[0m    at Console.trace (citizen:/scripting/v8/console.js:297:19)
e[38;5;42m[      script:oxmysql] e[0me[0m    at s.handlePacket (@oxmysql/oxmysql.js:1:112014)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.onPacket (@oxmysql/oxmysql.js:1:107060)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.executeStart (@oxmysql/oxmysql.js:1:271253)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.<anonymous> (@oxmysql/oxmysql.js:1:107208)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.emit (events.js:210:5)
e[38;5;42m[      script:oxmysql] e[0me[0m    at addChunk (_stream_readable.js:308:12)
e[38;5;42m[      script:oxmysql] e[0me[0m    at readableAddChunk (_stream_readable.js:289:11)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.Readable.push (_stream_readable.js:223:10)
e[38;5;42m[      script:oxmysql] e[0me[0m    at TCP.onStreamRead (internal/stream_base_commons.js:182:23)
e[38;5;42m[      script:oxmysql] e[0me[0m0 134982 ==> o#unknown name(2,maybeOK,26)
e[38;5;42m[      script:oxmysql] e[0me[0mAdd command: c
e[38;5;42m[      script:oxmysql] e[0me[0m        Sending query command: SET TRANSACTION ISOLATION LEVEL READ COMMITTED
e[38;5;42m[      script:oxmysql] e[0me[0m0 134982 <== c#unknown name(0,,51)
e[38;5;42m[      script:oxmysql] e[0me[0m0 134982 <== 2f00000003534554205452414e53414354494f4e2049534f4c4154494f4e204c4556454c205245414420434f4d4d4954544544
e[38;5;42m[      script:oxmysql] e[0me[0m raw: 00000002000000
e[38;5;42m[      script:oxmysql] e[0me[0mTrace: undefined
e[38;5;42m[      script:oxmysql] e[0me[0m    at Console.trace (citizen:/scripting/v8/console.js:297:19)
e[38;5;42m[      script:oxmysql] e[0me[0m    at s.handlePacket (@oxmysql/oxmysql.js:1:112014)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.onPacket (@oxmysql/oxmysql.js:1:107060)
e[38;5;42m[      script:oxmysql] e[0me[0m    at i.executeStart (@oxmysql/oxmysql.js:1:271253)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.<anonymous> (@oxmysql/oxmysql.js:1:107208)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.emit (events.js:210:5)
e[38;5;42m[      script:oxmysql] e[0me[0m    at addChunk (_stream_readable.js:308:12)
e[38;5;42m[      script:oxmysql] e[0me[0m    at readableAddChunk (_stream_readable.js:289:11)
e[38;5;42m[      script:oxmysql] e[0me[0m    at Socket.Readable.push (_stream_readable.js:223:10)
e[38;5;42m[      script:oxmysql] e[0me[0m    at TCP.onStreamRead (internal/stream_base_commons.js:182:23)
e[38;5;42m[      script:oxmysql] e[0me[0m0 134982 ==> c#unknown name(1,maybeOK,11)
e[38;5;42m[      script:oxmysql] e[0me[0m        Resultset header received, expecting 0 column definition packets
e[38;5;42m[      script:oxmysql] e[0me[0me[32mDatabase server connection established!e[97m
1 Like

This is not an error. You enabled debug mode. (Remove ?debug from connection string)

Ok, i get it, thanks for the answer :slight_smile:

It’s actually weird since i had debug=false in the connection string and also set mysql_debug “false”

Still, it doesn’t work, but i think right now it’s a problem in my query or something, i’ll check it out.

debug=false is somehow taken as true, remove that completely from connection string

1.5.1 (pending build) resolves an issue with the imports file when referencing queries with store id, and asserts the queries coming through for improved error reporting.

1 Like

Just a praise post, but I really enjoy this wrapper. The transation export especially is really useful.

Thanks guys! :snail: :heart:

2 Likes

[ script:oxmysql] [ERROR] qb-core was unable to execute a query!

[ script:oxmysql] Table ‘s2080_mysql.permissions’ doesn’t exist

[ script:oxmysql] SELECT * FROM permissions

[ script:qb-core] SCRIPT ERROR: @qb-core/server/main.lua:19: attempt to index a nil value (local ‘result’)

[ script:oxmysql] [ERROR] qb-drugs was unable to execute a query!

[ script:oxmysql] Table ‘s2080_mysql.dealers’ doesn’t exist

[ script:oxmysql] SELECT * FROM dealers

[ script:qb-drugs] SCRIPT ERROR: @qb-drugs/server/deliveries.lua:211: attempt to index a nil value (local ‘dealers’)

little help?