Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MySQL - SimpleAuth

Comments in 'Plugin Development' started by ImagicalGamer, Mar 22, 2016.

  1. ImagicalGamer
    Offline

    ImagicalGamer Active Member

    Joined:
    Feb 25, 2016
    Posts:
    141
    Minecraft User:
    ImagicalGamer
    I have MySQL installed on a Ubuntu server. To use it with SimpleAuth do I need to make a table? If so how would I do that? (MySQL n00b xD)
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Vaivez66 likes this.
  3. ImagicalGamer
    Offline

    ImagicalGamer Active Member

    Joined:
    Feb 25, 2016
    Posts:
    141
    Minecraft User:
    ImagicalGamer
    OK, thanks! Trying that now.
  4. ImagicalGamer
    Offline

    ImagicalGamer Active Member

    Joined:
    Feb 25, 2016
    Posts:
    141
    Minecraft User:
    ImagicalGamer
    My config looks like this:
    Code:
    # Default config for SimpleAuth plugin
    #Sets the data provider (yaml, sqlite3, mysql, none).
    #Only use none when there is another plugin that will integrate its dataProvider with SimpleAuth
    #Be aware that data is not automatically moved between data providers.
    dataProvider: mysql
    #For MySQL:
    dataProviderSettings:
    host: "52.19.23.88"
    port: 3306
    user: "user"
    password: "password"
    database: "sql8112360"
    #dataProviderSettings: []
    
    #If enabled, existing logged-in accounts won't be kicked if a new player joins with the same name
    forceSingleSession: true
    
    #Sets the minimum amount of characters to be used when registering a new account
    minPasswordLength: 6
    
    #Will block user after this number of failed attempts. Set to 0 to disable
    blockAfterFail: 6
    
    #If enabled, accounts that are using the same unique id (ip + clientId + name) when logging in again will be automatically authenticated
    authenticateByLastUniqueId: false
    
    #If enabled, will set all the permissions for simleauth.command.register to false
    disableRegister: false
    
    #If enabled, will set all the permissions for simleauth.command.login to false
    disableLogin: false
    
    #Number of seconds to wait for a player to be authenticated. If false, disables the timeout
    #TODO
    authenticateTimeout: 120
    This is the error I get:
    Code:
    [16:29:35] [Server thread/CRITICAL]: [SimpleAuth] Invalid MySQL settings
    What did I do wrong?
  5. Muqsit
    Offline

    Muqsit Active Member

    Joined:
    Sep 9, 2015
    Posts:
    175
    Minecraft User:
    Muqsit
    Change to
    host: "0.0.0.0"
    If you want to use one unique SimpleAuth folder for all your servers aka you want to share the same passwords across multiple serves on the same vps, you can just link files using 'ln -s'
  6. ImagicalGamer
    Offline

    ImagicalGamer Active Member

    Joined:
    Feb 25, 2016
    Posts:
    141
    Minecraft User:
    ImagicalGamer
    Ok thanks, I tried a file link... Do I link /server/plugins/simpleauth/players to server2/plugins/simpleauth/players or /server/plugins/simpleauth/ to /server2/plugins/simpleauth/?
  7. Muqsit
    Offline

    Muqsit Active Member

    Joined:
    Sep 9, 2015
    Posts:
    175
    Minecraft User:
    Muqsit
    Suppose
    server1 is the main server (/server1)
    server2 is a sub-server (/server2)



    You must first delete or rename your server2's SimpleAuth/players folder. Then

    ln -s /server1/plugins/SimpleAuth/players /server2/plugins/SimpleAuth
  8. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Indent the MySQL lines one space forward.

Share This Page

Advertisement