Skip to content

Remove SYSTEM_ADMIN_VARIABLES privilege #167

Description

@HugoFara

Originally on discussion on #147 by @ProgramComputer:

LWT does modify server variables, check for "set globals" such as "max_heap_table_size" and "tmp_table_size". These are not being modified at runtime and only after session restart do these changes appear. Not a concern if SQL interactions are handled safely. This line sudo mysql -e "GRANT SYSTEM_VARIABLES_ADMIN ON *.* TO $user@$host" prevents the need to restart the session after a text is parsed. If vulnerability is still a risk, the line can be removed. It resolved my error below when I installed demo db.

Screenshot 2023-12-25 205423

As far as I now, editing MAX_HEAP_SIZE was a quick and dirty way to import longer chunks of data, such as very long texts, backups and new terms. However it may not be the best approach, as it needs a privilege elevation, and may pose security issues at some point.

As temporary tables are already in use, coupling with batch insert can be a workaround. I do not think of using bulk insert due to the previous issues of this method in the past (#20).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    databaseDatabase-related issuesenhancementDevelop an existing feature

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions