Completely new to MySql, I know how to use a good readme though!

Discussion in 'Bukkit Help' started by skadabedop, Jan 28, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    skadabedop

    So I've managed to fire up a mysql web forum (see link) and created a custom field in which users input their minecraft username. What I'd LIKE to do is to be able to take this username field and to have it be added to a database so when a user registers on the forum, they're added to the builder list. IS THIS POSSIBLE? I'm currently running permissions for this sort of thing and it stores it in that ever so messy YML file. If there is a way I can somehow combine these things together, that'd be awesome.

    Also, any help tying bigbrother into mysql would be appreciated, too. I have mysql, but I don't really understand the steps necessary to make it work nicely with bigbrother. Any help would be greatly appreciated. Please either contact me via PM or email ([email protected]) if you're feeling particularly enthusiastic in helping me get all these parts to play nice.

    Thanks,
    Hubbazoot
     
  2. Offline

    Eddiekins

    How familiar are you with PHP scripting and Cron jobs?

    You could write a PHP script that goes into your forum's database, picks out every minecraft_username, connects to your local Minecraft MySQL server (you'd have to read up about accepting incoming connections on your Minecraft SQL database) and creates a new row in the 'rank' table for each minecraft_username. You could force this to execute this every hour or so via a Cron job (I presume your web server has cPanel, which makes Cron jobs as easy as pie).

    So in pseudocode:
    script runs from web server -> connection established to forum DB -> picks out MC usernames from users table - caches names -> connects to MC DB -> inserts cached usernames, ignore if already present.

    It seems simple in theory, but you're spanning a lot of technologies, platforms and server environments to do this. You'd have to find someone very generous and very knowledgeable to do this for you, I know basic PHP and SQL, but remote communication between a hosted SQL server and a local one isn't even PHP, that's nitty-gritty server administrative stuff that I know nothing about.
    (Unless of course your Minecraft database and your forum database are stored on the same server...)
    However, I'm sure that a couple of educated Google's could find you a few good tutorials though... ;)
     
  3. Offline

    skadabedop

    Yeah it's all on the same machine...
     
  4. Offline

    Eddiekins

    Then alll you really need to do is write a PHP script connecting the two databases, drawing out the minecraft usernames and inserting them into the database as rows Permissions can read.
     
  5. Offline

    ShivalWolf

    you would not even need php to do that, You could right a query in SQL directly that selected the username list from the forum table and just copied the values into the permissions table.

    Google search for "mysql Tutorial" there's ALOT out there that will give you the basics of query syntax and methods like join and union that you may need.
     
  6. Offline

    skadabedop

    Thanks very much for the tip. How about tying it into Permissions plugin?
     
  7. Offline

    ShivalWolf

    hmmm the permisions plugin doesn't use a database does it?
    its a flatfile?

    You will need a script to write out formatted data. Not an easy thing to do given how picky that file can be.
    Not sure how you would do it.
     
  8. Offline

    skadabedop

    Idk... it'd be really cool to get my server completely automated. I know BigBrother uses sql, but bigbrother doesn't get along with permissions very well...
     
Thread Status:
Not open for further replies.

Share This Page