Jump to content

MySQL Accounts 1.0.0

   (3 reviews)

1 Screenshot

About This File

GitHub Repository: https://github.com/RageMpOpenSource/RAGE-Accounts

A MySQL boilerplate to quickly create an account system without all the work. This handles both logging in and registration. This also utilised the delayedInitilisation feature added in RAGE:MP 1.1 to allow time for your database and any other assets on your server to be loaded first before allowing any user connections. By using this feature, this avoids any errors of users connecting before your resources are done loading. Read below for more information. A custom config file has also been used to easily change your database variables (username/database name/database password) and will allow you to easily add more configuration options going forward.

 

Features

  • CEF Login/Registration pages with error handling
  • Idle Kicker (Kicks any player who is sitting on the login/register pages after 60 seconds of no attempts)
  • Promise Based Loading
  • Easy Imported SQL into your MySQL Database

Installation

Prerequisites

  • NodeJS
  • MySQL Server (Fully setup)

Steps

  1. Download this resource and place it inside of your server folder
  2. Open your command prompt and change your directory of your command prompt to the server folder and then type npm install (You could also Shift + Right click inside your server folder and 'Open PowerShell window here' and type npm install if you don't know how to do this step)
  3. Head to packages/<folder>/settings.example.json and rename the file to settings.json (Remove the .example from the file name)
  4. Open up the settings.json file and edit the database details to connect to your server, if you're running it locally the default settings may be fine.
  5. Using the .sql file inside the server folder, run this inside your database to set it up (I won't be going into how to do this, Google "How to set up a MySQL server" if you don't know how to do this as I won't be offering support).
  6. Run your server, if there are no errors and it prints "Database connected successfully" then you're all done.

 

Looking for more information? Look at the GitHub repository here: https://github.com/RageMpOpenSource/RAGE-Accounts

  • Like 4

User Feedback

Create an account or sign in to leave a review

You need to be a member in order to leave a review

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Delfram

   4 of 4 members found this review helpful 4 / 4 members

Great job!

If you have error, you must install mysql2 module:

npm install --save mysql2

some error:

[ERROR] "template" package loading failed, exception stack:
Error: Cannot find module 'mysql2/promise'
Require stack:
- C:\Users\...\Desktop\Tester\packages\template\index.js
- C:\Users\...\Desktop\Tester\bin\loader.mjs
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:893:15)
    at Function.Module._load (internal/modules/cjs/loader.js:743:27)
    at Module.require (internal/modules/cjs/loader.js:965:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (C:\Users\...\Desktop\Tester\packages\template\index.js:15:9)
    at Module._compile (internal/modules/cjs/loader.js:1076:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:941:32)
    at Function.Module._load (internal/modules/cjs/loader.js:782:14)
    at Module.require (internal/modules/cjs/loader.js:965:19)

 

Link to review
TvA

· Edited by TvA

   1 of 1 member found this review helpful 1 / 1 member

cool

Link to review
GamingTv

   0 of 1 member found this review helpful 0 / 1 member

[ERROR] "template" package loading failed, exception stack:
Error: Cannot find module 'mysql2/promise'
Require stack:
- C:\Users\...\Desktop\Tester\packages\template\index.js
- C:\Users\...\Desktop\Tester\bin\loader.mjs
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:893:15)
    at Function.Module._load (internal/modules/cjs/loader.js:743:27)
    at Module.require (internal/modules/cjs/loader.js:965:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (C:\Users\...\Desktop\Tester\packages\template\index.js:15:9)
    at Module._compile (internal/modules/cjs/loader.js:1076:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:941:32)
    at Function.Module._load (internal/modules/cjs/loader.js:782:14)
    at Module.require (internal/modules/cjs/loader.js:965:19)   🧐

Response from the author:

Read step 2, you skipped this step.

Link to review
×
×
  • Create New...