Using global and session variables

As you have seen in the previous chapters, you can set the parameters by connecting to MySQL and executing the SET command.

There are two types of variables based on the scope of the variable:

  • Global: Applies to all the new connections
  • Session: Applies only to the current connection (session)

Get MySQL 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.