Book description
Design and administer enterprise-grade MySQL 8 solutions
About This Book
- Store, retrieve, and manipulate your data using the latest MySQL 8 features
- Practical recipes on effective administration in MySQL, with a focus on security, performance tuning, troubleshooting, and more
- Contains tips, tricks, and best practices for designing, developing, and administering your MySQL 8 database solution without any hassle
Who This Book Is For
If you are a MySQL developer or administrator looking for quick, handy solutions to solve the most common and not-so-common problems in MySQL, this book is for you. MySQL DBAs looking to get up-to-speed with the latest MySQL 8 development and administration features will also find this book very useful. Prior knowledge of Linux and RDBMS is desirable.
What You Will Learn
- Install and configure your MySQL 8 instance without any hassle
- Get to grips with new features of MySQL 8 like CTE, Window functions and many more
- Perform backup tasks, recover data and set up various replication topologies for your database
- Maximize performance by using new features of MySQL 8 like descending indexes, controlling query optimizer and resource groups
- Learn how to use general table space to suit the SaaS or multi-tenant applications
- Analyze slow queries using performance schema, sys schema and third party tools
- Manage and monitor your MySQL instance and implement efficient performance-tuning tasks
In Detail
MySQL is one of the most popular and widely used relational databases in the World today. The recently released MySQL 8 version promises to be better and more efficient than ever before.
This book contains everything you need to know to be the go-to person in your organization when it comes to MySQL. Starting with a quick installation and configuration of your MySQL instance, the book quickly jumps into the querying aspects of MySQL. It shows you the newest improvements in MySQL 8 and gives you hands-on experience in managing high-transaction and real-time datasets. If you've already worked with MySQL before and are looking to migrate your application to MySQL 8, this book will also show you how to do that. The book also contains recipes on efficient MySQL administration, with tips on effective user management, data recovery, security, database monitoring, performance tuning, troubleshooting, and more.
With quick solutions to common and not-so-common problems you might encounter while working with MySQL 8, the book contains practical tips and tricks to give you the edge over others in designing, developing, and administering your database effectively.
Style and approach
This book takes a recipe-based approach to tackling the pain points of SQL developers. It is a comprehensive book full of solutions to common problems faced by SQL administrators and developers alike.
Publisher resources
Table of contents
- Preface
-
MySQL 8 - Installing and Upgrading
- Introduction
- Installing MySQL using YUM/APT
- Installing MySQL 8.0 using RPM or DEB files
- Installing MySQL on Linux using Generic Binaries
- Starting or Stopping MySQL 8
- Uninstalling MySQL 8
- Managing the MySQL Server with systemd
- Downgrading from MySQL 8.0
- Upgrading to MySQL 8.0
- Installing MySQL utilities
-
Using MySQL
- Introduction
- Connecting to MySQL using the command-line client
- Creating databases
- Creating tables
- Inserting, updating, and deleting rows
- Loading sample data
- Selecting data
- Sorting results
- Grouping results (aggregate functions)
- Creating users
- Granting and revoking access to users
- Selecting data into a file and table
- Loading data into a table
- Joining tables
- Stored procedures
- Functions
- Triggers
- Views
- Events
- Getting information about databases and tables
- Using MySQL (Advanced)
- Configuring MySQL
- Transactions
- Binary Logging
-
Backups
- Introduction
-
Taking backups using mysqldump
-
How to do it...
- Full backup of all databases
- Point-in-time recovery
- Dumping master binary coordinates
- Specific databases and tables
- Ignore tables
- Specific rows
- Backup from a remote server
- Backup to rebuild another server with a different schema
- Only schema and no data
- Only data and no schema
- Backup for merging data with other server
-
How to do it...
- Taking backups using mysqlpump
- Taking backups using mydumper
- Taking backups using flat files
- Taking backups using XtraBackup
- Locking instances for backup
- Binary log backup
- Restoring Data
-
Replication
- Introduction
- Setting up replication
- Setting up master-master replication
- Setting up multi-source replication
- Setting up replication filters
- Switching slave from master-slave to chain replication
- Switching the slave from chain replication to master-slave
- Setting up delayed replication
- Setting up GTID replication
- Setting up semi-synchronous replication
-
Table Maintenance
- Introduction
- Installing Percona Toolkit
- Altering tables
- Moving tables across databases
- Altering tables using an online schema change tool
- Archiving tables
- Cloning tables
- Partitioning tables
- Partition pruning and selection
- Partition management
- Partition information
- Efficiently managing time to live and soft delete rows
-
Managing Tablespace
- Introduction
- Changing the number or size of InnoDB redo log files
- Resizing the InnoDB system tablespace
- Creating file-per-table tablespaces outside the data directory
- Copying file-per-table tablespaces to another instance
- Managing UNDO tablespace
- Managing general tablespace
- Compressing InnoDB tables
- Managing Logs
-
Performance Tuning
- Introduction
- The explain plan
- Benchmarking queries and the server
- Adding indexes
- Invisible index
- Descending index
- Analyzing slow queries using pt-query-digest
- Optimizing datatypes
- Removing duplicate and redundant indexes
- Checking index usage
- Controlling the query optimizer
- Using index hints
- Indexing for JSON using generated columns
- Using resource groups
- Using performance_schema
- Using the sys schema
- Security
Product information
- Title: MySQL 8 Cookbook
- Author(s):
- Release date: January 2018
- Publisher(s): Packt Publishing
- ISBN: 9781788395809
You might also like
book
MySQL Cookbook
While MySQL has turned up among high profile users such as Yahoo!, NASA and the U.S. …
book
Advanced MySQL 8
Design cost-efficient database solutions, scale enterprise operations and reduce overhead business costs with MySQL Key Features …
book
MySQL Cookbook, 3rd Edition
MySQLâ??s popularity has brought a flood of questions about how to solve specific problems, and thatâ??s …
book
MySQL in a Nutshell, 2nd Edition
When you need to find the right SQL keyword or MySQL client command-line option right away, …