WirelessRedstone icon indicating copy to clipboard operation
WirelessRedstone copied to clipboard

Customizable MySQL Server settings

Open rautamiekka opened this issue 10 years ago • 5 comments

Currently the plugin uses either Bukkit Server's settings or no MySQL at all.

What the config would look like:

MySQL:
    enabled: false
    useBukkitSettings: false
    address: localhost
    port: 3306
    username: minecraft
    password: minecraft

and the useSQL option is replaced by those.

rautamiekka avatar Sep 01 '15 13:09 rautamiekka

We use liteDB. It's stored inside the channels folder. I don't know if I add a MySQL version

Bart-0110 avatar Sep 01 '15 13:09 Bart-0110

LiteDB is NoSQL, but it'll be easy enough for me to create the MySQL queries from desciption, should the time for MySQL arrise.

rautamiekka avatar Sep 01 '15 13:09 rautamiekka

Oops, I meant SQLite, not LiteDB. It's either a .yml or a .db file.

YAML is constructed like this:

  • Channel1.yml -> receivers, transmitters, screens and some other data for channel1
  • Channel2.yml -> receivers, transmitters, screens and some other data for channel2

SQLite is constructed like this:

  • channels.db
  • -> Channel1
  • --> receivers, transmitters, screens and some other data for channel1
  • -> Channel2
  • --> receivers, transmitters, screens and some other data for channel2

I don't have much experience with MySQL in a plugin, so I have to do some research. I also don't recommend to edit the channel files.

Bart-0110 avatar Sep 01 '15 13:09 Bart-0110

There are plenty of plugins using MySQL so you can find plenty of material to take example from, and porting SQLite<->MySQL is easy to do, at least for me, so I'll be very happy to provide SQLite<->MySQL translations.

rautamiekka avatar Sep 01 '15 14:09 rautamiekka

I would support MySQL option since it would make it easier for users that do know MySQL now, the default option of course can be yaml or SQLite. Then the user can enable MySQL or disable it in the config. @rautamiekka If you do a fork of the plugin. I would be willing to do a beta test on it before a pull request gets submitted to the main branch. Just to make things easier if that is okay with @Bart-0110.

Clarkcj12 avatar Sep 07 '19 04:09 Clarkcj12