1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

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

Config MySQL - MySQLWorkbench

Discussion in 'Skript' started by kittkarrkitt, Apr 12, 2021.

  1. kittkarrkitt

    Supporter

    Joined:
    Jan 4, 2021
    Messages:
    33
    Likes Received:
    0
    Hello. I am trying to setup a database between two servers for Skript, and I believe I have set it up correctly. However, now im testing it, it seems to not update an variable on the 2nd server, when changed on the 1st server.

    I got advised to go and check if the tables in the database were actually getting updated using MySQLWorkbench.

    Its sending [​IMG] while in the 2nd server, while the same variable is "1" in the 1st server.


    1st server code:
    Code (Text):
    1. command /data2b:
    2.     trigger:
    3.         broadcast "%{presta_perm1::%player%}%"
    4.         stop
    5.  
    6. command /doit:
    7.     trigger:
    8.         broadcast "%{presta_perm1::%player%}%"
    9.         wait 2 seconds
    10.         message "Doit executed"
    11.         if {presta_perm1::%player%} isn't set:
    12.             set {presta_perm1::%player%} to 0
    13.             message "&4TURNED OFF"
    14.             stop
    15.         if {presta_perm1::%player%} is 1:
    16.             set {presta_perm1::%player%} to 0
    17.             message "&4TURNED OFF"
    18.             stop
    19.         if {presta_perm1::%player%} is 0:
    20.             set {presta_perm1::%player%} to 1
    21.             message "&2TURNED ON"
    22.             stop
    2nd server code:
    Code (Text):
    1. command /data2b:
    2.     trigger:
    3.         broadcast "%{presta_perm1::%player%}%"
    4.         stop
    database info in "config.sk" on both servers in both configs after restarts:
    Code (Text):
    1. datatest:
    2.     type: MySQL
    3.     pattern: presta_.*
    4.     host: ***.**.***.***
    5.     port: 3307
    6.     user: USERNAME
    7.     password: **********
    8.     database: presta-database
    9.     table: variables21
    10.     #
    11.     monitor changes: true
    12.     monitor interval: 20 seconds
    (Some of the code is blurred out for security reasons)

    While looking in MySQLWorkbench, it seems like there is nothing being stored in the database.
    upload_2021-4-12_15-23-40.png


    The main questions here are:

    - Is the database actually empty?
    - How can I force something to be stored in there IF it is empty and how would I check it worked?
    - Is there anything wrong in the configuration of my database/config.sk file?
    - If Skript cant store data in the database, how can I make it do it?
    - What should be in the database if it DID store the variable from the codes above?

    Kind Regards to any readers or helpers.

    --- Double Post Merged, Apr 15, 2021, Original Post Date: Apr 12, 2021 ---
    Still need help with this
     

Share This Page

Loading...