Question Advantages of using Mysql?

Discussion in 'Bukkit Help' started by Wrendan, Feb 7, 2015.

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

    Wrendan

    Hello everyone!
    I noticed that a lot of plugins are using Mysql, I think that is a database for the server. I read (I don't renember where) that if you use mysql makes the server faster, that's true?
    Or what are the advantages of using Mysql? Makes faster the game or keeps logs inside of that databse?

    So tell me guys, should I create a Mysql account for my server?
     
  2. Offline

    Yukari

    MySQL is a database, it lets people store things in it. Minecraft itself does not (unless there's some hack I don't know of) allow storing anything in MySQL. Some plugins do allow storing stuff in MySQL, and if so using MySQL for that plugin could make the plugin faster, MySQL is faster than using yml or json or similar plain text files that some plugins default to, but if the plugin is already using something like sqlite (which is common) then MySQL will not make the plugin faster.

    You can read about it on Wikipedia https://en.wikipedia.org/wiki/MySQL
     
  3. Offline

    Lolmewn Retired Staff

    @Yukari MySQL can very much slow a plugin down, if used incorrectly. Setting up a connection takes a lot of time and can bring down tps a lot, while flatfile doesn't.

    The biggest advantage of MySQL, in my eyes, is having tables and being able to query data from it. With flatfile you have to read all data, then iterate through all of it to find the data you want.

    My biggest plugin, Stats, uses MySQL to store statistical data in a database which is later read by the website (or by the plugin when a player joins the server again). Doing this in plaintext is much harder imo, and you won't have the ability to use the website-part anymore.
     
Thread Status:
Not open for further replies.

Share This Page