MySQL command client

I was following the tutorial pretty well until now...
Creating your first user

Now that you have your database set up, you are going to need to create your first account to be an administrator. Make sure that you have built your project by hitting the blue hammer icon in NetBeans (F11). Now, open up a command line and navigate to the folder where you have the sources. Then, run the following command at a command line:
java -cp dist/ShoddyBattle.jar shoddybattle.AccountEditor USERNAME PASSWORD 2

substituting USERNAME and PASSWORD for your desired username and password. If you get a message like 'java' is not recognized as an internal or external command, you will need to locate your java executable first. For example, C:\Program Files\Java\jdk1.x.x_xx\bin\java.exe. Once you have found this file, drag it to your command line and then enter the rest of the command.

Image: Adding an administrator account

If all has gone right, you should now be able to run your server. Press the large green arrow icon in Netbeans or hit F6 to run. You should see some output at the bottom of the window, hopefully without any errors. Now you can try to connect to your server. Open the Shoddy Battle client and go to the advanced window. Enter localhost for the host and whichever port you selected earlier for the port. Hopefully you are now connected to your server. You should be able to log in with the username you picked earlier.

I don't know how to create the Admin Account and where to create it.
If some one would explain it to me slowly and nicely it would be superb and when do i know my server is working
and if i clos the MySQL client my previous work gets deleted...How do i reload the prvious work?
 
Creating your first user, open server.properties, and set the Database information right. Then open a regular command line. NOT the MySQL command line. Type in...
Code:
cd (Location of the ShoddyBattle Folder)
If you followed the guide it should be like C:\Users\Whatever\Documents\NetBeansProjects\ShoddyBattle, thats for Vista anyways.
then after you have it open it should say...

Code:
C:\Users\Whatever\Documents\NetBeansProjects\ShoddyBattle>

Then type in this code
Code:
java -cp dist/ShoddyBattle.jar shoddybattle.AccountEditor admin admin 2
That will make an Administrator account with the username and password as admin.

From the guide....
substituting USERNAME and PASSWORD for your desired username and password. If you get a message like 'java' is not recognized as an internal or external command, you will need to locate your java executable first. For example, C:\Program Files\Java\jdk1.x.x_xx\bin\java.exe. Once you have found this file, drag it to your command line and then enter the rest of the command.

Then run the Project in NetBeans (Be sure its set to Main Project). You can run it by pressing F6, or the Green Triangle in NetBeans. Then your server should be ready.

Hope I helped.

EDIT: I reread your post, the MySQL command line already saves your work when you close it, you can keep it closed. Your server will be working when you connect with...

Host: localhost
Port: (Whatever you put for port in the guide)

If you connect, then attampt to make a user, if you succeed, you've got it running well.
 
thanks i did al the next parts.
now i am on the part where my server works.
I cant login using my admin password... but i can with a created account on that server(registered)
now how do i enable logging in with my admin account and how do i enable that and also i am kinda stuck with letting other people log in the server i am not sure what my IP is and how i port forward the tut on portforward doesen't help
and btw i am using BTHomehub (white one)
 
Well, if you've reached your server's Login Screen, then you just type what you put for username and password and you're in. If you have just the advanced conenction open, try 'localhost' for host and whatever you put for port for port. Be sure that the Server is running.

To port forward, just open up run, type in cmd. Then type ipconfig/all after you've hit enter. The command prompt will appear. Type 'ipconfig/all' Then there should be an IP like 192.168.1.254. Put that into Firefox, or IE, or whatever you use. Then just search around for Portforward, then forward UDP/TCP port for your server.
 
hmm what Host do other people have to put in when they wanna try to connect to my server i am sure its not local host and it would be great if you will explain how i will be able to do it.
and do i need to leave my computer on 24 7 for the server to work or is there another way?
thanks in advance!
:D
 
Host is your current Public IP Address. To get your IP address go to this website: http://www.whatismyip.net.

As long as your comeputer is on and awake with the server/netbeans running, it will work. TO keep your server 24/7, just keep your computer with netbeans/server running.
 
Back
Top