https://github.com/thymona/fivem-mysql
MySQL library/resource made for FiveM. Fastest MySQL library for FiveM
https://github.com/thymona/fivem-mysql
fivem fivem-script library mysql mysql-performance performance sql standalone standalone-library
Last synced: 7 months ago
JSON representation
MySQL library/resource made for FiveM. Fastest MySQL library for FiveM
- Host: GitHub
- URL: https://github.com/thymona/fivem-mysql
- Owner: ThymonA
- License: gpl-3.0
- Created: 2020-12-29T21:23:29.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-21T20:36:26.000Z (almost 5 years ago)
- Last Synced: 2025-04-26T02:49:32.547Z (10 months ago)
- Topics: fivem, fivem-script, library, mysql, mysql-performance, performance, sql, standalone, standalone-library
- Language: TypeScript
- Homepage:
- Size: 87.9 KB
- Stars: 15
- Watchers: 3
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FiveM MySQL - MySQL library for FiveM
[](https://github.com/ThymonA/fivem-mysql)
[](https://github.com/ThymonA/fivem-mysql/issues)
[](https://github.com/ThymonA/fivem-mysql/blob/master/LICENSE)
[](https://github.com/ThymonA/fivem-mysql)
[](https://github.com/ThymonA/fivem-mysql)
This mysql-async Library for FiveM intends to provide function to connect to a MySQL in a Sync and Async way. This resource is inspired by [`fivem-mysql-async`](https://github.com/brouznouf/fivem-mysql-async) and written by [ThymonA](https://github.com/ThymonA/)
### **Example**
If you want to know how this resource works? check the [`example.lua`](https://github.com/ThymonA/fivem-mysql/blob/master/example.lua) file inside this resource.
### **Config the `server.cfg`**
**Config** | **Description** | **Default**
:----------|:----------------|:----------------
`mysql_connection_string` | MySQL connection string, there are two variants possible: Check **`Connections strings`** under this table. | `mysql://root@localhost/fivem`
`mysql_level` | Warn level used to print message in console, there are couble of options like: `info`, `debug`, `warn`, `error` or `fatal` | `warn`
`mysql_slow_query_warning` | When an query takes longer than the defined number, print an query warn message in console to let the server know that the executed query is slow | `500` (ms)
#### **Connections strings:**
**Variants:**
* `mysql://root:pass1234@localhost/fivem`
* `server=localhost;userid=root;password=pass1234;database=fivem`
### **Issues**
Make sure you provide all information possible when reporting an issue.
### **Changelog**
For a detailed changelog either check the commits or read [`https://github.com/ThymonA/fivem-mysql/releases`](https://github.com/ThymonA/fivem-mysql/releases)
### **Features**
* Async / Sync.
* It uses the [node-mysql2](https://github.com/sidorares/node-mysql2) library to provide a connection to your mysql server and is faster than the [mysql](https://github.com/mysqljs/mysql) library.