Git Product home page Git Product logo

ragemp-mysql's Introduction

UPDATE (11/01/2021)

I no longer recommend using this resource and instead recommend using this: https://github.com/RageMpOpenSource/RAGE-Accounts

This gamemode was never a great solution but was intended as a starting point, this does work but if you want to benefit your server you either need to look into improving the gamemode or use the other one I've recommended.

RageMP MySQL Template

This is a template of a very basic login/registration system you can implement into your gamemode to get started. This template only stores usernames and passwords(encrypted with BCrypt) so anything extra will need to be implemented yourself.

Installation

Either download the source from RageMP or by getting it from here. You'll also need to have a MySQL server setup, either using WAMP/XAMPP/or from a server. To keep this short I will not go through setting these up, simply Google 'How to setup WAMP' for example to get it setup.

  1. Unzip the source and place it inside of your server files folder.
  2. Open your command prompt and change your directory to your server folder. Then do 'npm install' to install the required node_modules.
  3. Go to your database, create a new database and call it whatever you want (Inside the script it is called ragemp-mysql). Once created, import the ragemp-mysql.sql into your newly created database.
  4. Go to packages/mysql/mysql.js and open it. At the top is the connection info, change this to whatever your IP and MySQL username/password is. If you're hosting this locally and you haven't made/changed the MySQL info, the default should be fine.
  5. You're all set to go.

Known Issues

  • All current known issues will be placed under the issues tab. If there's an issue and it isn't listed there, please create a new issue or contact me.

Contribution

I'm more than happy for anyone to contribute and fix up anything, and I'm happy for anyone to create Issues if there's a fault they found/any suggestions to make this better.

Contact

ragemp-mysql's People

Contributors

mrpancakers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ragemp-mysql's Issues

Ragemp 1.1 problem

Basically when I start the server everything works fine, but when server is already running for some time (i.e. 10 hours) you can't login or register, you hit login/register button, it disappears and nothing more is happening, the login window is still showing on the screen, the only fix for that is to reset server every few hours but that just is not comfortable. I am running server on Debian 10 (buster) with mariadb MySQL server and phpmyadmin panel to manage database.

Error: Cannot find module 'mysql'

Hej , i try on linux start but have this issues !!
What to do 4 fix ?
------------------------------------ srv log ------------------------------------

[N] Starting network... - OK: (IPv4-only) at 127.0.0.1:22005
Loading packages
"mysql" loaded
Error: Error: Cannot find module 'mysql'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:587:15)
at Function.Module._load (internal/modules/cjs/loader.js:513:25)
at Module.require (internal/modules/cjs/loader.js:643:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (/home/ragemp-srv/packages/mysql/mysql.js:1:75)
at Module._compile (internal/modules/cjs/loader.js:707:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:718:10)
at Module.load (internal/modules/cjs/loader.js:605:32)
at tryModuleLoad (internal/modules/cjs/loader.js:544:12)
at Function.Module._load (internal/modules/cjs/loader.js:536:3)
[P] Plugin bridge.so loaded!
Started HTTP server at 22006 port.

[MYSQL] Error: ETIMEDOUT

Hello,
sadly the mysql connection doesnt really work all the time.
it works sometimes but thats rare.
The DB is hosted locally so i dont really understand why i get a timeout

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.