2. Agenda
▪ Database design and Planning
▪ MySQL Installation and
Configuration
▪ Optimization
▪ Replication
▪ Backup and Monitoring
▪ Q&A
3. Database design and planning
● Outlining the functional specifications.
− Considering Application Workflow
− Table Structure and Naming conventions
− Workbench ERD
● Scope and Flexibility of database design.
− Easy to extend
− Capability to Handle large volume of data
−
●
●
4. MySQL Installation and Configuration
● Ways to install MySQL
− Source code
− Binaries
− Packages
− MySQL Installer MSI and ZIP Archive
− Yum repository
● Configuration
− Storage engine
− Variables
− User management and Access control
●
5. Optimization
● Hardware
− Storage and file types : SSD/HDD and EXT4 or XFS
on Linux
− Memory : Optimal performance,Large
transaction,indexes,faster response time for ongoing
changes and utilize Disk IO
− CPU : Faster processors with many cores provide
better throughput
12. Replication
● With and without GTID
● Need Master_Log_File and Master_Log_Pos
● GTID
− What problems GTID solves?
● It is possible to identify a transaction uniquely across the
replication servers. Make the automation of failover
process much easier. There is no need to do
calculations, inspect the binary log and so on. Just
MASTER_AUTO_POSITION=1.
●
− Enable GTID replication
● gtid_mode: It can be ON or OFF (not 1 or 0). It enables
the GTID on the server.
● log_bin: Enable binary logs. Mandatory to create a
replication environment.
● log-slave-updates: Slave servers must log the changes
that comes from the master in its own binary log.
● Enforce-gtid-consistency : Statements that can’t be
logged in a transactionally safe manner are denied by
the server.
13. Backup and Monitoring
● Binary Backup
− MySQL Enterprise Backup
● Logical Backup
− mysqldump
● Hot Backup
− Replication slave
● Customized scripts
14. Backup and Monitoring
● Monitoring and statistics
− SHOW PROCESSLIST
− System databases
− Enterprise Monitoring(MEM)
− MySQL Utilities
− Audit logs & General logs
−