Guenther_Lauch Posted April 1, 2020 Posted April 1, 2020 Hello Community, now I have a problem. I dont get any connection to the database. Those were my steps: 1. C:\RAGEMP\server-files\ragemp-mysql 2. I did an npm install mysql on C:\RAGEMP\server-files\ragemp-mysql. C:\RAGEMP gave me warnings, so it must be C:\RAGEMP\server-files\ragemp-mysql. 3. Database is on localhost, user is root and no password is set and I imported ragemp-mysql.sql in my database ragemp-mysql. 4. Server Starts up, i join the game and there is no regestration and after reconnect I spawn at the default spawn point. Also there is no hint in the cmd at startup, that there is any database connection. Could you please help me, I really want this feature so bad I tried FiveM the last days, but I couldnt convert XML files to YMAP. RAGEMP works with json so I hope I can convert XML to json. Greetings from Germany Sebastian Peisl
Xabi Posted April 1, 2020 Posted April 1, 2020 C:\RAGEMP\server-files\ragemp-mysql What's that path and what does it contain? I mean, are you following RAGE's structure?
Guenther_Lauch Posted April 1, 2020 Author Posted April 1, 2020 I follewed this guide: # 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](https://rage.mp) 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. 3. 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. 4. 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 - Discord: MrPancakers#9283 - RageMP Forums: https://rage.mp/profile/5511-mrpancakers/
Xabi Posted April 1, 2020 Posted April 1, 2020 You're not loading any package, are you sure you followed the guide step by step?
Guenther_Lauch Posted April 1, 2020 Author Posted April 1, 2020 Yes I see. I did follow every step I guess. This is the content of the ragemap-mysql folder: This is the content of my server-files folder: Maybe I need to split up the folder content of ragemp-mysql into the server-files folders?!
Xabi Posted April 1, 2020 Posted April 1, 2020 Ok, don't you see that some of those folders have the same name? That should be a clue to fix your error in the structure.
Guenther_Lauch Posted April 1, 2020 Author Posted April 1, 2020 Yes I see now, but why is there no extra step in the guide?
Guenther_Lauch Posted April 1, 2020 Author Posted April 1, 2020 Is there any detailed tutorial on this out there?
Xabi Posted April 1, 2020 Posted April 1, 2020 I guess you'll need another link before starting using resources, you're missing the basic knowledge: https://wiki.rage.mp/index.php?title=Getting_Started_with_Development
Guenther_Lauch Posted April 1, 2020 Author Posted April 1, 2020 Oh my god I made it! There needs to be a better tutorial actually. Maybe I will do it.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now