Update all server variables at once #4281
-
Hello there! I'll need to update all server variables at once. For example if I want to change all Minecraft versions to 1.8.8 at once, is there any SQL command or something I could do? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Most likely this is not relevant anymore, but I'll write it out for future reference to others. You can quite easily change all the variables, but that alone does nothing without triggering a reinstall to apply it. I'd suggest taking a short MySQL tutorial anywhere on the internet. You'd want to use an UPDATE statement with a more beginner-friendly guide reference here. and SELECT statement to find the data. Always take a backup of the database before modifying it when you don't know what you are doing. Typing wrong values can modify a lot of server variables.Looking at the panel database, you can find the Step 1Find the Step 2Type the following to enter the MySQL CLI on the machine hosting your panel. mysql -u root Step 3Replace
An example output would be: | id | env_variable |
+----+----------------+
| 3 | SERVER_JARFILE |
| 4 | MC_VERSION |
| 5 | BUILD_TYPE |
| 6 | FORGE_VERSION |
+----+----------------+ Here the MC_VERSION variable id is 4. We can now target it. Step 4UPDATE panel.server_variables SET variable_value = '1.8.8' WHERE variable_id = '4'; The query above would set the value of all variables matching the variable_id 4 to 1.8.8. Once you got it figured out for one egg, repeat it again. mysql -u root
SELECT id,env_variable FROM panel.egg_variables WHERE egg_id = '2';
UPDATE panel.server_variables SET variable_value = '1.8.8' WHERE variable_id = '4'; |
Beta Was this translation helpful? Give feedback.
Most likely this is not relevant anymore, but I'll write it out for future reference to others. You can quite easily change all the variables, but that alone does nothing without triggering a reinstall to apply it.
I'd suggest taking a short MySQL tutorial anywhere on the internet. You'd want to use an UPDATE statement with a more beginner-friendly guide reference here. and SELECT statement to find the data.
Always take a backup of the database before modifying it when you don't know what you are doing. Typing wrong values can modify a lot of server variables.
Looking at the panel database, you can find the
egg_variables
table and inside itenv_variable
column. We'll have to locate the va…