• Setting up MySQL for your plugins
    7 replies, posted
Welcome everyone, today I will be teaching you how to setup MySQL for your plugins on a Brohoster server. Since I got such great comments from my last tutorial I have decided to write another one. Lucky for you this one is somewhat useful and might just help you out. Lets get started. [h2]Getting a MySQL database[/h2][release]Most, if not all, Minecraft host should provide you with a MySQL database. If you own a VPS then you can set one up yourself or if you have a semi-managed server, like brohoster.com, then you can request one. Its easy as submitting a ticket and asking JWJ to get off his lazy ass and make you a MySQL database. Just kidding JWJ is awesome. But that is really all it takes. If you don't know how to submit a ticket then go read another tutorial because I don't feel like explaining that. [B]MySQL Info Stuff Things:[/B] [img_thumb]http://i55.tinypic.com/x2rrc9.png[/img_thumb] [highlight]I would like to point out that the IP in the photo is a local one and is used by your server. To connect you will be using a diffrent IP.[/highlight] You should get back something similar above. You should have a username and password but I chose to blank my out because obviously that would be a bad idea.[/release][h2]Logging into the database[/h2][release]This part I am a little new with. Only reason I say this is because JWJ recommended that I get HeidiSQL to manage my database. I use to think I would only use phpmyadmin or some other type of web based management. Well I was wrong but this HeidiSQL thing works to. First you want to go and download HeidiSQL. A quick google and you should get a link pretty easily but I will be nice and paste it in this tutorial for those who don't know what google.com is. They also do offer portable versions so that might help out some of you. [B]Website:[/B] [URL]http://www.heidisql.com/[/URL] [B]Download:[/B] [URL]http://heidisql.googlecode.com/files/HeidiSQL_6.0_Setup.exe[/URL] Once downloaded, start the installer and install it because I am not going to teach you how to do that. I am pretty sure you will manage without my wonderful help. After you done installing run it. You should be presented with a screen similar to the one below. [B]HeidiSQL First Screen:[/B] [img_thumb]http://i55.tinypic.com/a4onj7.png[/img_thumb] Now this is almost like my last tutorial with FileZilla. Its just a matter of putting in information and stuff so that you can connect to your database. Press the new button and fill in the information. Should look similar to the picture below. [B]HeidiSQL Info Screen:[/B] [img_thumb]http://i56.tinypic.com/14tsqpk.png[/img_thumb] After you have everything enter correctly hit Save and then Open. You should get a new screen with some weird ass shit all over the place that looks extremely confusing. Don't worry. As long as you can follow what I am doing you won't mess that much stuff up. Your screen should look similar to this. If you didn't connect correctly or some weird reason go back and check everything. If you still are having trouble then just post in the thread and I will help you. [B]HeidiSQL connected bitches:[/B] [img_thumb]http://i53.tinypic.com/1qjpdt.png[/img_thumb] From here you don't need to touch this program because most of the stuff in the next set will be configuring the plugin to write stuff to here. But don't get me wrong we will use this program before this tutorial is done. But not right now. [/release][h2]Setting up MySQL[/h2][release]Today we will be using BigBrother for CraftBukkit to test out the MySQL database and see if everything runs fine. If you don't know how to install a plugin or don't know where to get one then I will provide you two very useful links below so you can accomplish this task. [B]Plugin Tutorial:[/B] [URL]http://www.facepunch.com/threads/1066951-How-to-install-a-plugin-for-Bukkit[/URL] [B]BigBrother Thread:[/B] [URL]http://forums.bukkit.org/threads/sec-bigbrother-1-6-3-a-complete-griefer-logging-rollback-package-440.166/[/URL] Now that you have the plugin installed correctly and all that stuff we shall begin with setting up the plugin. Open up your BigBrother.Properties file with any text editor. Here you will make some changes so that BigBrother can write to our database correctly and not just throw errors at you. (Well that might happen if you fuck this up. But I have faith in you.) [B]Default Properties:[/B] [img_thumb]http://i53.tinypic.com/2cid8w8.png[/img_thumb] This is the default properties file for BigBrother. We will only be editing about 2 - 3 lines out of this whole thing but if you want to make some other changes then be my guest. But try not to mess anything up. First thing you want to change is the mysqlDB line. [B]Before:[/B] jdbc:mysql://localhost:3306/minecraft [B]After:[/B] jdbc:mysql://<Host IP here>:3306/<Database name> [B]Mine:[/B] jdbc:mysql://50.22.36.130:3306/TC78668517744500350303662 If you look at the picture back at the top you will see JWJ set me the Host ip, which I put in for localhost. And the database name, which is that long string of stuff at the end. Yours may or may not be similar but if you ever need help just ask in the thread. After you have changed this line we will need to provide the file a Username and Password to access the database so it can write stuff. You should see two lines, mysqlPass and mysqlUser. Enter your Mysql Username and Password that your host provided you into these two lines. Once your done save it and upload it back to your server. Should look similer to this. [B]What The Properties File Should Look Like:[/B] [img_thumb]http://i55.tinypic.com/34s3q4p.png[/img_thumb] [/release][h2]Testing[/h2][release]If you did everything correctly and followed this tutorial to a T then you should be fine. But before you test you should start your server up. Let it run for a good minute. Then stop it and restart it back up again. From there you can go back into HeidiSQL and press the refresh button at the top. You should start to see data being written to your database. This lets you know that everything works and you can finally get back to playing Minecraft. [B]REFRESH!:[/B] [img_thumb]http://i52.tinypic.com/az730j.png[/img_thumb] [/release][h2]Other stuff you might want to know[/h2][release]Some plugins require you to upload their own .sql files to your database. This is not hard but I know for a fact some of you are going to ask how to do that and why shit is not working very well. WorldGuard is a good example for this. So once you have WorldGuard downloaded you should see the .jar, some other text files, and a blacklist_table.sql file. We want the .sql file if you haven't guess yet. Drag that over to your desktop and open up HeidiSQL. Log-in and navigate to your database. After that go up to import and hit Load SQL file. Navigate to your .sql or the blacklist_table.sql file and open it up. You should see a bunch of text inside of a small box with some stuff you probably don't under stand. Don't touch it. Just press the big blue play button above it and it should query the code to your database. You may or may not get an error stating "Duplicate comment table thing" but if you do just ignore it. If its anything else then you might of messed something up. But if you see blacklist_events in your database then you should be fine. [B]FUCK YER!:[/B] [img_thumb]http://i55.tinypic.com/72ei3t.png[/img_thumb] End result may or may not look like this but you should be close to it.[/release][h2]Thanks and Donation[/h2][release] I want to thank JWJ for providing me with a MySQL database, awesome customer service and amazing servers. Also if you found this tutorial awesome and great and just have a couple bucks left over from your server purchase then please donate. I offer my services for free and getting something in return would help. Plus gas is like $3.45. Fucking insane. [URL="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=alex_stewart%40ymail%2ecom&lc=US&item_name=Nerdy%27s%20awesome%20tutorial&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted"][IMG]https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif[/IMG][/URL] Also my next tutorial might be about how to setup a nether world and a regular world server and have it where you can play on both but still have the same shit. This would also require two servers.[/release][B]TL:DR[/B] [QUOTE=Ehmmett;28466448]"run a program. change some stuff. restart server. Now donate plees"[/QUOTE]
I dont know how to do any of this or what most of it means but im guessing its going to be useful for some people.
Actually nerdy, you don't need two servers for nether. Bukkit has integrated multi world capabilities since a while back, i run a netherworld on the same server instance as my main one, resulting in seamless nether, sure no red fog, but not having to mess with ServerPort makes it worth it.
[QUOTE=Profanwolf;28505189]Actually nerdy, you don't need two servers for nether. Bukkit has integrated multi world capabilities since a while back, i run a netherworld on the same server instance as my main one, resulting in seamless nether, sure no red fog, but not having to mess with ServerPort makes it worth it.[/QUOTE] True but with a bedrock server from brohoster I don't think I can do that very well. But I will experiment.
It'll do fine, it's just another chunk. I can't recall if it keeps them loaded even if no players are in it, though.
[QUOTE=JWJ;28507541]It'll do fine, it's just another chunk. I can't recall if it keeps them loaded even if no players are in it, though.[/QUOTE] I don't think the chunks stay loaded at least.
The only chunks which are loaded and stay loaded are the ones the player sees. Unless you've got a plugin which forcefully has set chunks always loaded. Useful for spawn areas and such.
Sorry, you need to Log In to post a reply to this thread.