O'Reilly logo

MySQL 8 Cookbook by Karthik Appigatla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

Enable a instrument from the sys schema:

mysql> CALL sys.ps_setup_enable_instrument('statement');+------------------------+| summary                |+------------------------+| Enabled 22 instruments |+------------------------+1 row in set (0.08 sec)Query OK, 0 rows affected (0.08 sec)

If you want to reset to default, do this:

mysql> CALL sys.ps_setup_reset_to_default(TRUE)\G*************************** 1. row ***************************status: Resetting: setup_actorsDELETE FROM performance_schema.setup_actors WHERE NOT (HOST = '%' AND USER = '%' AND `ROLE` = '%')1 row in set (0.01 sec)~*************************** 1. row ***************************status: Resetting: threadsUPDATE performance_schema.threads SET INSTRUMENTED = 'YES'1 row in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required