An sophisticated encapsulation of the mysql2 and sequelize libraries, ingeniously designed to empower CFX scripts with seamless capabilities for accessing and manipulating data within relational databases.
We created this database connection system because, even though there are good solutions out there, we wanted to bring something new to the table for the FiveM community. We've added some cool features that are missing in other systems, and we hope you find it useful!
- Multiple DB Connections
- Cache system for frequent queries
- Basic connections cache
- MongoDB Support
- Await and Async support for all functions
- Backup system
- Discord Logs for relevant information.
- ORM(Object Relation Mapping) support
- Script auto updater
- Redis Support
- Logs system
- Basic system to give a solution for each error
- Support Lua, JS, C# library
- Library to change other mysql system functions to ice
- Named and unnamed parameters support
- Debug UI
- Error handling
- Download the latest release from here
- Extract the resource in your resources folder
- Add
ensure icmysql
at the top of your server.cfg - In the server.cfg add your databases connections like this:
set mysqlCredentials_1 "host=127.0.0.1;user=root; password=1234; database=fxserver; port=3306"
set mysqlCredentials_2 "host=127.0.0.1;user=root; password=1234; database=fxserver; port=3306"
...
- Enjoy! and thanks for trusting in ICMySQL
We're going to list some known issues here, so you don't have to worry about them. Or you don't have to report them, because we already know about them. If you find any other issues, please report them in our Discord Server.
- First query after a restart is slow(because we wait to make the connection to the database)
- Thread hitch warning when starting the resource(don't worry, it's normal)
Right now we only give support in our Discord Server. Anyway you can open an issue in our GitHub, if you ask in the forum we will try to answer you as soon as possible but to make sure to get an answer join our Discord Server.