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 our 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.

help MySQL ERROR

Discussion in 'Skript' started by ammar, Jan 24, 2018.

Tags:
Thread Status:
Not open for further replies.
  1. ammar

    ammar Member

    Joined:
    May 15, 2017
    Messages:
    11
    Likes Received:
    1
    hi
    help MySQL ERROR



    Code (Skript):
    1. 24.01 22:49:03 [Server] ERROR database error: Deadlock found when trying to get lock; try restarting transaction
    2. 24.01 22:48:53 [Server] ERROR database error: Deadlock found when trying to get lock; try restarting transaction
    3. 24.01 22:48:43 [Server] ERROR database error: Deadlock found when trying to get lock; try restarting transaction
    skript config
    Code (Skript):
    1.     database 1:
    2.  
    3.         # an example database to describe all possible options.
    4.  
    5.        
    6.  
    7.         type: MySQL
    8.  
    9.         # The type of this database. Allowed values are 'CSV', 'SQLite', 'MySQL' and 'disabled'.
    10.  
    11.         # CSV uses a text file to store the variables, while SQLite and MySQL use databases, and 'disabled' makes Skript ignore the database as if it wasn't defined at all.
    12.  
    13.        
    14.  
    15.         pattern: my.*
    16.  
    17.         # Defines which variables to save in this database.
    18.  
    19.         # This pattern uses Regex syntax, e.g. use 'db_.*' (without the quotes) to store all variables prefixed with 'db_' in this database,
    20.  
    21.         # or use '.*' (the default value) to store all variables here (recommended for the last database in this list, as otherwise some variables might not be saved).
    22.  
    23.         # Please note that variables are only stored in one database, and databases are checked from top to bottom,
    24.  
    25.         # e.g. if a variable matches the topmost database's pattern it will be saved there and nowhere else.
    26.  
    27.         # BTW: Patterns are checked in a separate thread, i.e. your server likely won't run slower when using complicated patterns.
    28.  
    29.        
    30.  
    31.         monitor changes: true
    32.  
    33.         monitor interval: 15 seconds
    34.  
    35.         # If 'monitor changes' is set to true, variables will repeatedly be checked for updates in the database (in intervals set in 'monitor interval').
    36.  
    37.         # ! Please note that you should set 'pattern', 'monitor changes' and 'monitor interval' to the same values on all servers that access the same database!
    38.  
    39.        
    40.  
    41.         # == MySQL configuration ==
    42.  
    43.         host: myMySQL ip
    44.  
    45.         port: 3306 # 3306 is MySQL's default port, i.e. you likely won't need to change this value
    46.  
    47.         user: yazonpro
    48.  
    49.         password: mypassword
    50.  
    51.         database: yazonpro_Skript # The database to use. Skript will automatically create a table 'variables21' in this database if it doesn't exist
    52.  
    53.                          # (If the table exists but is defined differently that how Skript expects it to be you'll get errors and no variables will be saved and/or loaded)
    54.  
    55.        
    56.  
    57.         # == SQLite/CSV configuration ==
    58.  
    59.         file: ./plugins/Skript/variables.db
    60.  
    61.         # Where to save the variables to. For a CSV file, the file extension '.csv' is recommended, but not required, but SQLite database files must end in '.db' (SQLibrary forces this).
    62.  
    63.         # The file path can either be absolute (e.g. 'C:\whatever\...' [Windows] or '/usr/whatever/...' [Unix]), or relative to the server directory (e.g. './plugins/Skript/...').
    64.  
    65.        
    66.  
    67.         backup interval: 2 hours
    68.  
    69.         # Creates a backup of the file every so often. This can be useful if you ever want to revert variables to an older state.
    70.  
    71.         # Variables are saved constantly no matter what is set here, thus a server crash will never make you loose any variables.
    72.  
    73.         # Set this to 0 to disable this feature.
    74.  
    75.        
    76.  
    --- Double Post Merged, Jan 25, 2018, Original Post Date: Jan 24, 2018 ---
    up
     
  2. MartinOdum

    MartinOdum Member

    Joined:
    Jan 26, 2017
    Messages:
    111
    Likes Received:
    13
    You should use skript-db for mysql related stuff in skript. The built it system is messy and not as flexible and I honestly don't even know if it works correctly
     
Thread Status:
Not open for further replies.
Loading...