SlideShare a Scribd company logo
MySQL Usability Guidelines
History
We started receiving a lot of feedback about new features being hard to use.
The number of server configuration options has ballooned from 5.0 -> 8.0.
How do we address it?
Some of the basics are easy: easy to download, install, upgrade, start.
It is not that obvious which cases justify configuration options versus not.
Need some general guidelines for the team to follow to evaluate features.
1. Use SQL
All features should be possible with one language: SQL.
You can setup, configure, observe through the server protocol.
Use SQL (cont.)
Two reasons this was really important to me:
ā— The manual suggested changing settings by editing a file, and then restarting
the server.
ā—‹ Where is that file?
ā—‹ What if I don’t have local access to the server?
ā—‹ It made instructions differ per platform or be too vague!
ā— MySQL Shell can make configuration changes on your behalf, including
changing required defaults for Group Replication.
2. Discoverability
Reading the manual cover-to-cover should not be a requirement
Error messages should be intuitively obvious:
Expression #1 of SELECT list is not in GROUP BY clause and contains
nonaggregated column ā€˜test.t1.t’ which is not functionally dependent on columns in
GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Discoverability (cont.)
I think this is one of the most important guidelines.
It was really problematic that ā€œutf8 did not mean real utf8ā€ because utf8mb4 was
not discoverable.
Some error messages do not say that this error was generated because of an
SQL mode (MySQL 9.0?)
This guideline applies to error messages, configuration variable names, values,
and features themselves.
3. Less is More
Having too many similar options without clearly differentiate use cases can have a
paralyzing effect on users.
Resist the temptation to create new configuration options where use-cases are not
yet known. It shifts the decision from those who are empowered with information
(the developers) to the users.
Less is more (cont.)
This principal is perhaps the most controversial since power users want options.
The bar is set that there must be a known use case. i.e.
There are little benefits to switching the default InnoDB File Format.
.. but a user may be compelled to research to make sure they have selected the
correct option.
4. Observability
A sanity check: if you add an option, the user must be able to measure it. If they
cannot, should the option really exist?
Further extends the bar to adding new configuration options.
5. Orthogonality
A feature should work the same way in all contexts:
Foreign Keys with Partition Tables
Foreign Keys with Triggers
Stored Procedures with SBR
If there is a CREATE and DROP command, there should be an ALTER command.
This works in partnership with Discoverability (#2).
6. Idempotency + Atomicity
The system should be safe to script against, or orchestrate in a safe manner.
Scripts need to resume after errors, and avoid double processing of steps.
7. Use Case Driven
We will seek meaningful ways to extend functionality in ways that match the most
common use cases for our users. i.e.
We added the -> and ->> shorthand JSON operators to support the most common
functions when accessing JSON documents.
This can conflict with less is more (#3).
8. Preserve Upgrade Story
It is okay to deprecate or remove functionality.
It is undesirable to redefine existing functionality.
This makes it much harder to use new and old versions at same time
It is sometimes better to cause a hard error, then a subtle change in functionality
that could go undetected.
This can conflict with less is more (#3).
9. Safe by Default
Opt-in to optimizations that result in data loss versus opt-out.
Includes instrumentation in definition since flying blind prevents observation.
This has evolved over MySQL’s history with InnoDB and strict mode now being the
default.
10. Secure by Default
This principle can often appear contradictory to usability, in that sometimes secure
practices get in the way of users.
The goal is to lower the barrier to entry for using best practices.
Thank you!
Thank you also to MySQL ACEs Bill Karwin, Ronald Bradford, Rick James, Shlomi
Noach for providing feedback.

More Related Content

What's hot (20)

PDF
MySQL Server Defaults
Morgan Tocker
Ā 
PDF
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
Kenny Gryp
Ā 
PDF
MySQL Connectors 8.0.19 & DNS SRV
Kenny Gryp
Ā 
PDF
MySQL: From Single Instance to Big Data
Morgan Tocker
Ā 
PDF
MySQL 5.5&5.6 new features summary
Louis liu
Ā 
PDF
MySQL Performance Metrics that Matter
Morgan Tocker
Ā 
PDF
Upgrade to MySQL 5.7 and latest news planned for MySQL 8
Ted Wennmark
Ā 
PDF
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
Dave Stokes
Ā 
PDF
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
Continuent
Ā 
PDF
MySQL Shell for Database Engineers
Mydbops
Ā 
PDF
Methods of Sharding MySQL
Laine Campbell
Ā 
PDF
My sql 5.7-upcoming-changes-v2
Morgan Tocker
Ā 
PDF
MySQL Manchester TT - Performance Tuning
Mark Swarbrick
Ā 
PDF
Midwest PHP Presentation - New MSQL Features
Dave Stokes
Ā 
PDF
Welcome to MySQL
Grigale LTD
Ā 
PDF
MySQL 5.6 config å„ŖåŒ–
Alexis Li
Ā 
PDF
MySQL High Availability Solutions
Mydbops
Ā 
DOCX
Master master vs master-slave database
Wipro
Ā 
PDF
How to upgrade like a boss to MySQL 8.0 - PLE19
Alkin Tezuysal
Ā 
ODP
Mysql For Developers
Carol McDonald
Ā 
MySQL Server Defaults
Morgan Tocker
Ā 
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
Kenny Gryp
Ā 
MySQL Connectors 8.0.19 & DNS SRV
Kenny Gryp
Ā 
MySQL: From Single Instance to Big Data
Morgan Tocker
Ā 
MySQL 5.5&5.6 new features summary
Louis liu
Ā 
MySQL Performance Metrics that Matter
Morgan Tocker
Ā 
Upgrade to MySQL 5.7 and latest news planned for MySQL 8
Ted Wennmark
Ā 
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
Dave Stokes
Ā 
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
Continuent
Ā 
MySQL Shell for Database Engineers
Mydbops
Ā 
Methods of Sharding MySQL
Laine Campbell
Ā 
My sql 5.7-upcoming-changes-v2
Morgan Tocker
Ā 
MySQL Manchester TT - Performance Tuning
Mark Swarbrick
Ā 
Midwest PHP Presentation - New MSQL Features
Dave Stokes
Ā 
Welcome to MySQL
Grigale LTD
Ā 
MySQL 5.6 config å„ŖåŒ–
Alexis Li
Ā 
MySQL High Availability Solutions
Mydbops
Ā 
Master master vs master-slave database
Wipro
Ā 
How to upgrade like a boss to MySQL 8.0 - PLE19
Alkin Tezuysal
Ā 
Mysql For Developers
Carol McDonald
Ā 

Similar to MySQL Usability Guidelines (20)

PDF
MySQL Reference Manual
webhostingguy
Ā 
PDF
PHP Detroit -- MySQL 8 A New Beginning (updated presentation)
Dave Stokes
Ā 
PDF
MySQL Cookbook 1st ed Edition Paul Dubois
uzielklael28
Ā 
PPTX
7 Database Mistakes YOU Are Making -- Linuxfest Northwest 2019
Dave Stokes
Ā 
PDF
The Proper Care and Feeding of MySQL Databases
Dave Stokes
Ā 
PDF
MySQL New Features -- Sunshine PHP 2020 Presentation
Dave Stokes
Ā 
PDF
Mysql Cookbook Solutions For Database Developers And Administrators Dubois
raysseycan
Ā 
PPTX
MySQL 8.0 Featured for Developers
Dave Stokes
Ā 
PPTX
cPanel now supports MySQL 8.0 - My Top Seven Features
Dave Stokes
Ā 
PDF
High Performance MySQL Optimization Backups Replication and More Second Editi...
samsmadomira
Ā 
DOC
My sql technical reference manual
Mir Majid
Ā 
PDF
High Performance Mysql Optimization Backups Replication And More Second Schwartz
nauzadmenooa26
Ā 
PPTX
Sql server infernals
Gianluca Sartori
Ā 
PPTX
Locking Down Your MySQL Database.pptx
Dave Stokes
Ā 
PPTX
MySQL 8 - UKOUG Techfest Brighton December 2nd, 2019
Dave Stokes
Ā 
PDF
Mysql In A Nutshell In A Nutshell Oreilly Second Edition Russell Dyer
atchaaslaney
Ā 
PDF
Learning Mysql Seyed Mm Saied Tahaghoghi Hugh Williams
margasmst
Ā 
PDF
Mysql Cookbook Solutions For Database Developers And Administrators 4th Editi...
ahlrotdeiko
Ā 
PDF
Mysql Cookbook Solutions For Database Developers And Administrators 4th Editi...
ahlrotdeiko
Ā 
PDF
MySQL Best Practices - OTN LAD Tour
Ronald Bradford
Ā 
MySQL Reference Manual
webhostingguy
Ā 
PHP Detroit -- MySQL 8 A New Beginning (updated presentation)
Dave Stokes
Ā 
MySQL Cookbook 1st ed Edition Paul Dubois
uzielklael28
Ā 
7 Database Mistakes YOU Are Making -- Linuxfest Northwest 2019
Dave Stokes
Ā 
The Proper Care and Feeding of MySQL Databases
Dave Stokes
Ā 
MySQL New Features -- Sunshine PHP 2020 Presentation
Dave Stokes
Ā 
Mysql Cookbook Solutions For Database Developers And Administrators Dubois
raysseycan
Ā 
MySQL 8.0 Featured for Developers
Dave Stokes
Ā 
cPanel now supports MySQL 8.0 - My Top Seven Features
Dave Stokes
Ā 
High Performance MySQL Optimization Backups Replication and More Second Editi...
samsmadomira
Ā 
My sql technical reference manual
Mir Majid
Ā 
High Performance Mysql Optimization Backups Replication And More Second Schwartz
nauzadmenooa26
Ā 
Sql server infernals
Gianluca Sartori
Ā 
Locking Down Your MySQL Database.pptx
Dave Stokes
Ā 
MySQL 8 - UKOUG Techfest Brighton December 2nd, 2019
Dave Stokes
Ā 
Mysql In A Nutshell In A Nutshell Oreilly Second Edition Russell Dyer
atchaaslaney
Ā 
Learning Mysql Seyed Mm Saied Tahaghoghi Hugh Williams
margasmst
Ā 
Mysql Cookbook Solutions For Database Developers And Administrators 4th Editi...
ahlrotdeiko
Ā 
Mysql Cookbook Solutions For Database Developers And Administrators 4th Editi...
ahlrotdeiko
Ā 
MySQL Best Practices - OTN LAD Tour
Ronald Bradford
Ā 
Ad

More from Morgan Tocker (16)

PDF
Introducing Spirit - Online Schema Change
Morgan Tocker
Ā 
PDF
FOSDEM MySQL and Friends Devroom
Morgan Tocker
Ā 
PDF
Introducing TiDB - Percona Live Frankfurt
Morgan Tocker
Ā 
PDF
TiDB Introduction - Boston MySQL Meetup Group
Morgan Tocker
Ā 
PDF
TiDB Introduction - San Francisco MySQL Meetup
Morgan Tocker
Ā 
PDF
TiDB Introduction
Morgan Tocker
Ā 
PDF
MySQL 8.0 Optimizer Guide
Morgan Tocker
Ā 
PDF
MySQL Cloud Service Deep Dive
Morgan Tocker
Ā 
PDF
MySQL 5.7 + JSON
Morgan Tocker
Ā 
PDF
MySQL Query Optimization
Morgan Tocker
Ā 
PDF
MySQL For Linux Sysadmins
Morgan Tocker
Ā 
PDF
MySQL 5.7: Core Server Changes
Morgan Tocker
Ā 
PDF
MySQL 5.6 - Operations and Diagnostics Improvements
Morgan Tocker
Ā 
PDF
Locking and Concurrency Control
Morgan Tocker
Ā 
PDF
The InnoDB Storage Engine for MySQL
Morgan Tocker
Ā 
PDF
Optimizing MySQL
Morgan Tocker
Ā 
Introducing Spirit - Online Schema Change
Morgan Tocker
Ā 
FOSDEM MySQL and Friends Devroom
Morgan Tocker
Ā 
Introducing TiDB - Percona Live Frankfurt
Morgan Tocker
Ā 
TiDB Introduction - Boston MySQL Meetup Group
Morgan Tocker
Ā 
TiDB Introduction - San Francisco MySQL Meetup
Morgan Tocker
Ā 
TiDB Introduction
Morgan Tocker
Ā 
MySQL 8.0 Optimizer Guide
Morgan Tocker
Ā 
MySQL Cloud Service Deep Dive
Morgan Tocker
Ā 
MySQL 5.7 + JSON
Morgan Tocker
Ā 
MySQL Query Optimization
Morgan Tocker
Ā 
MySQL For Linux Sysadmins
Morgan Tocker
Ā 
MySQL 5.7: Core Server Changes
Morgan Tocker
Ā 
MySQL 5.6 - Operations and Diagnostics Improvements
Morgan Tocker
Ā 
Locking and Concurrency Control
Morgan Tocker
Ā 
The InnoDB Storage Engine for MySQL
Morgan Tocker
Ā 
Optimizing MySQL
Morgan Tocker
Ā 
Ad

Recently uploaded (20)

PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
Ā 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
Ā 
PDF
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
Ā 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
Ā 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
Ā 
DOCX
Import Data Form Excel to Tally Services
Tally xperts
Ā 
PPTX
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
Ā 
PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
Ā 
PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
Ā 
PPTX
Engineering the Java Web Application (MVC)
abhishekoza1981
Ā 
PDF
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
Ā 
PDF
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
Ā 
PPTX
An Introduction to ZAP by Checkmarx - Official Version
Simon Bennetts
Ā 
PDF
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
Ā 
PPTX
Equipment Management Software BIS Safety UK.pptx
BIS Safety Software
Ā 
PDF
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
Ā 
PDF
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
Ā 
PPTX
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
Ā 
PDF
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
Ā 
PPTX
How Apagen Empowered an EPC Company with Engineering ERP Software
SatishKumar2651
Ā 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
Ā 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
Ā 
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
Ā 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
Ā 
Tally software_Introduction_Presentation
AditiBansal54083
Ā 
Import Data Form Excel to Tally Services
Tally xperts
Ā 
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
Ā 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
Ā 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
Ā 
Engineering the Java Web Application (MVC)
abhishekoza1981
Ā 
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
Ā 
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
Ā 
An Introduction to ZAP by Checkmarx - Official Version
Simon Bennetts
Ā 
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
Ā 
Equipment Management Software BIS Safety UK.pptx
BIS Safety Software
Ā 
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
Ā 
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
Ā 
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
Ā 
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
Ā 
How Apagen Empowered an EPC Company with Engineering ERP Software
SatishKumar2651
Ā 

MySQL Usability Guidelines

  • 2. History We started receiving a lot of feedback about new features being hard to use. The number of server configuration options has ballooned from 5.0 -> 8.0. How do we address it? Some of the basics are easy: easy to download, install, upgrade, start. It is not that obvious which cases justify configuration options versus not. Need some general guidelines for the team to follow to evaluate features.
  • 3. 1. Use SQL All features should be possible with one language: SQL. You can setup, configure, observe through the server protocol.
  • 4. Use SQL (cont.) Two reasons this was really important to me: ā— The manual suggested changing settings by editing a file, and then restarting the server. ā—‹ Where is that file? ā—‹ What if I don’t have local access to the server? ā—‹ It made instructions differ per platform or be too vague! ā— MySQL Shell can make configuration changes on your behalf, including changing required defaults for Group Replication.
  • 5. 2. Discoverability Reading the manual cover-to-cover should not be a requirement Error messages should be intuitively obvious: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ā€˜test.t1.t’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
  • 6. Discoverability (cont.) I think this is one of the most important guidelines. It was really problematic that ā€œutf8 did not mean real utf8ā€ because utf8mb4 was not discoverable. Some error messages do not say that this error was generated because of an SQL mode (MySQL 9.0?) This guideline applies to error messages, configuration variable names, values, and features themselves.
  • 7. 3. Less is More Having too many similar options without clearly differentiate use cases can have a paralyzing effect on users. Resist the temptation to create new configuration options where use-cases are not yet known. It shifts the decision from those who are empowered with information (the developers) to the users.
  • 8. Less is more (cont.) This principal is perhaps the most controversial since power users want options. The bar is set that there must be a known use case. i.e. There are little benefits to switching the default InnoDB File Format. .. but a user may be compelled to research to make sure they have selected the correct option.
  • 9. 4. Observability A sanity check: if you add an option, the user must be able to measure it. If they cannot, should the option really exist? Further extends the bar to adding new configuration options.
  • 10. 5. Orthogonality A feature should work the same way in all contexts: Foreign Keys with Partition Tables Foreign Keys with Triggers Stored Procedures with SBR If there is a CREATE and DROP command, there should be an ALTER command. This works in partnership with Discoverability (#2).
  • 11. 6. Idempotency + Atomicity The system should be safe to script against, or orchestrate in a safe manner. Scripts need to resume after errors, and avoid double processing of steps.
  • 12. 7. Use Case Driven We will seek meaningful ways to extend functionality in ways that match the most common use cases for our users. i.e. We added the -> and ->> shorthand JSON operators to support the most common functions when accessing JSON documents. This can conflict with less is more (#3).
  • 13. 8. Preserve Upgrade Story It is okay to deprecate or remove functionality. It is undesirable to redefine existing functionality. This makes it much harder to use new and old versions at same time It is sometimes better to cause a hard error, then a subtle change in functionality that could go undetected. This can conflict with less is more (#3).
  • 14. 9. Safe by Default Opt-in to optimizations that result in data loss versus opt-out. Includes instrumentation in definition since flying blind prevents observation. This has evolved over MySQL’s history with InnoDB and strict mode now being the default.
  • 15. 10. Secure by Default This principle can often appear contradictory to usability, in that sometimes secure practices get in the way of users. The goal is to lower the barrier to entry for using best practices.
  • 16. Thank you! Thank you also to MySQL ACEs Bill Karwin, Ronald Bradford, Rick James, Shlomi Noach for providing feedback.