Skocz do zawartości
  • 0

Jak połączyć z MySQL


sosnax1
 Udostępnij

Pytanie

Tak jak w temacie jak połączyć z MySQL?

Robiłem tak:

# ==== Variables ====databases:	dat1:		# A MySQL database example, with options unrelated to MySQL removed.		type: MySQL				pattern: synced_.* # this pattern will save all variables that start with 'synced_' in this MySQL database.				host: sql.sosnax1.***.pl		port: 3307		user: ****		password: *******		database: sosnax1_2				monitor changes: true		monitor interval: 20 seconds	default:		# The default "database" is a simple text file, with each variable on a separate line and the variable's name, type, and value separated by commas.		# This is the last database in this list to catch all variables that have not been saved anywhere else.		# You can modify this database freely, but make sure to know what you're doing if you don't want to loose any variables.				type: MySQL				pattern: synced_.* # this pattern will save all variables that start with 'synced_' in this MySQL database.				host: sql.sosnax1.****.pl		port: 3307		user: *****		password: *****		database: sosnax1_2		# PS: If you don't want some variables to be saved in any database (e.g. variables that contain an %entity% which usually despawn when the server is shut down)	# you can modify the last database's pattern to not match all variables, e.g. use '(?!x_).*' to match all variables that don't start with 'x_'.	# Be very cautious when doing this however as unsaved variables cannot be recovered after the server has been stopped.	# I recommend to use a single character to denote unsaved variables (similar to local variables' '_'), e.g. '-', in which case the last database's pattern should be '(?!-).*'.

Ale zmieniałem tylko ta cześć i nic nie dało baza danych jak była tak jest pusta, a wykonywałem operacje wpisywania zmiennych... Co więcej usunąwszy variables.sk i folder backups świeżo dodane zmienne działały a plik się nie stworzył...

Odnośnik do komentarza
Udostępnij na innych stronach

6 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
[14:42:50] [Server thread/INFO]: [Skript] Loading Skript v2.1.2[14:42:51] [Server thread/INFO]: [SkriptPlus] Loading SkriptPlus v1.4.2[14:42:56] [Server thread/INFO]: [Skript] Loaded a total of 11504 english aliases[14:42:56] [Server thread/INFO]: [Skript]  ~ created by & © Peter Güttinger aka Njol ~[14:43:21] [Server thread/INFO]: [SQLibrary] Enabling SQLibrary v7.1[14:43:21] [Server thread/INFO]: SQLibrary loaded.[14:43:35] [Server thread/INFO]: [SkriptPlus] Enabling SkriptPlus v1.4.2[14:44:23] [Server thread/INFO]: Done (92.268s)! For help, type "help" or "?"[14:44:23] [Server thread/INFO]: Starting GS4 status listener[14:44:23] [Query Listener #1/INFO]: Query running on 213.189.52.243:27204[14:44:32] [pool-3-thread-14/INFO]: [Skript] Checking for the latest version of Skript...[14:44:32] [Server thread/ERROR]: #!#! [14:44:32] [Server thread/ERROR]: #!#! ===!!!=== Skript variable load error ===!!!===[14:44:32] [Server thread/ERROR]: #!#! Unable to load (all) variables:[14:44:32] [Server thread/ERROR]: #!#! The config is missing the entry for 'monitor changes' in the database 'default'[14:44:32] [Server thread/ERROR]: #!#! The config is missing the entry for 'monitor interval' in the database 'default'[14:44:32] [Server thread/ERROR]: #!#! [14:44:32] [Server thread/ERROR]: #!#! Skript will work properly, but old variables might not be available at all and new ones may or may not be saved until Skript is able to create a backup of the old file and/or is able to connect to the database (which requires a restart of Skript)![14:44:32] [Server thread/ERROR]: #!#! [14:44:33] [Server thread/WARN]: [Skript] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (bilet.sk, line 17: if name of the player's tool is "bilet":')[14:44:34] [Skript update thread/INFO]: [Skript] You're currently running the latest stable version of Skript.[14:44:34] [Server thread/WARN]: [Skript] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (config.sk, line 141: databases:')[14:44:34] [Server thread/ERROR]: [Skript] invalid line - all code has to be put into triggers (config.sk, line 33: language: english')[14:44:34] [Server thread/ERROR]: [Skript] invalid line - all code has to be put into triggers (config.sk, line 40: check for new version: true')[14:44:34] [Server thread/ERROR]: [Skript] invalid line - all code has to be put into triggers (config.sk, line 46: update check interval: 12 hours')[14:44:34] [Server thread/ERROR]: [Skript] invalid line - all code has to be put into triggers (config.sk, line 53: automatically download new version: false')[14:44:34] [Server thread/ERROR]: [Skript] invalid line - all code has to be put into triggers (config.sk, line 61: enable effect commands: false')[14:44:34] [Server thread/ERROR]: [Skript] invalid line - all code has to be put into triggers (config.sk, line 62: effect command token: !')[14:44:34] [Server thread/ERROR]: [Skript] invalid line - all code has to be put into triggers (config.sk, line 77: allow ops to use effect commands: false')[14:44:34] [Server thread/ERROR]: [Skript] invalid line - all code has to be put into triggers (config.sk, line 82: date format: default')[14:44:34] [Server thread/ERROR]: [Skript] invalid line - all code has to be put into triggers (config.sk, line 91: verbosity: normal')[14:44:34] [Server thread/ERROR]: [Skript] invalid line - all code has to be put into triggers (config.sk, line 99: plugin priority: high')[14:44:34] [Server thread/ERROR]: [Skript] invalid line - all code has to be put into triggers (config.sk, line 111: log player commands: true')[14:44:34] [Server thread/ERROR]: [Skript] invalid line - all code has to be put into triggers (config.sk, line 116: number accuracy: 2')[14:44:34] [Server thread/ERROR]: [Skript] invalid line - all code has to be put into triggers (config.sk, line 121: maximum target block distance: 100')[14:44:34] [Server thread/ERROR]: [Skript] invalid line - all code has to be put into triggers (config.sk, line 127: case sensitive: false')[14:44:34] [Server thread/ERROR]: [Skript] invalid line - all code has to be put into triggers (config.sk, line 132: disable variable conflict warnings: false')[14:44:34] [Server thread/ERROR]: [Skript] can't understand this event: 'databases' (config.sk, line 141: databases:')[14:44:34] [Server thread/ERROR]: [Skript] invalid line - all code has to be put into triggers (config.sk, line 145: version: 2.1.2')[14:44:35] [Server thread/WARN]: [Skript] Possible name conflict of variables {praca.tick::*} and {praca.tick::%line 2%} (there might be more conflicts). (praca.sk, line 191: Delete {praca.tick::*}')[14:44:35] [Server thread/WARN]: [Skript] Possible name conflict of variables {praca.warunek::%arg 2%} and {praca.warunek::*} (there might be more conflicts). (praca.sk, line 202: set {praca.warunek::%arg 2%} to arg 5')[14:44:35] [Server thread/WARN]: [Skript] Possible name conflict of variables {praca.cena::%arg 2%} and {praca.cena::*} (there might be more conflicts). (praca.sk, line 203: set {praca.cena::%arg 2%} to arg 3')[14:44:35] [Server thread/WARN]: [Skript] Possible name conflict of variables {praca.tick::%arg 2%} and {praca.tick::*} (there might be more conflicts). (praca.sk, line 204: set {praca.tick::%arg 2%} to arg 4')[14:44:35] [Server thread/WARN]: [Skript] Possible name conflict of variables {event::*} and {event::%arg%} (there might be more conflicts). (timeevent.sk, line 123: delete {event::*}')[14:44:35] [Server thread/WARN]: [Skript] Possible name conflict of variables {event.name::1} and {event.name::%{event.licz}%} (there might be more conflicts). (timeevent.sk, line 126: send "%{event.name::1}%"')[14:44:35] [Server thread/WARN]: [Skript] Possible name conflict of variables {vote.gracze::*} and {vote.gracze::%player%} (there might be more conflicts). (vote.sk, line 41: delete {vote.gracze::*}')[14:44:35] [Server thread/INFO]: [Skript] Loaded 18 scripts with a total of 41 triggers and 37 commands in 2.66 seconds[14:44:35] [Server thread/INFO]: [Skript] Finished loading.[14:53:22] [Server thread/INFO]: [Skript] Disabling Skript v2.1.2

Skrócona wersja.

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

1. Popraw skrypt.

2. Sprawdź czy masz plik variables.csv

 a )Nie masz go, to stwórz go w głównym katalogu skript'a. (pamiętaj, aby zapisać jako .csv nie jako zwykły plik tekstowy)

 b )Masz go, to skopiuj już istniejące skrypty i usuń katalog skript'a, zrestartuj serwer.

Edytowane przez LeviBoyPL
Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

1. Popraw skrypt.

2. Sprawdź czy masz plik variables.csv

 a )Nie masz go, to stwórz go w głównym katalogu skript'a. (pamiętaj, aby zapisać jako .csv nie jako zwykły plik tekstowy)

 b )Masz go, to skopiuj już istniejące skrypty i usuń katalog skript'a, zrestartuj serwer.

Nie można od 'tak' stworzyć variables.csv, jest tam zapisana na początku instrukcja.
Odnośnik do komentarza
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...