SlideShare a Scribd company logo
1 of 23
HOW (NOT) TO KILL YOUR
MYSQL INFRASTRUCTURE
Based on true stories
2
• Miklos ‘Mukka’ Szel
• From Hungary
• Started using Linux in 1997 and MySQL in 2000, used to be a backend
developer
• Worked for Own Startup, ISP, Walt Disney(ESPN,Cricinfo),
PalominoDB/Pythian
• Freelance Consultant since 2015 - Edmodo
/ME
3
Ansible:
- name: Install MySQL-Oracle Server
yum: pkg={{ item }} state=present
with_items:
- MySQL-server
- MySQL-client
Centos/Redhat:
yum install MySQL-server
Debian/Ubuntu:
apt-get install percona-server-server-5.6
1. VERSION MISMATCH - SOFTWARE
4
./pt-slave-find --host 10.77.3.181 -u root--ask-pass
Enter password:
10.77.24.181
Version 5.6.32-78.1-log
Server ID 134
Uptime 318+06:01:55 (started 2015-11-19T02:42:03)
Replication Is not a slave, has 1 slaves connected, is not read_only
Filters
Binary logging MIXED
Slave status
Slave mode STRICT
InnoDB version 5.6.32-78.1
+- 10.77.25.17
Version 5.6.27-75.0-log
Server ID 143
Uptime 167+18:21:03 (started 2016 -04-17T14:22:55)
Replication Is a slave, has 0 slaves connected, is read_only
Filters
Binary logging MIXED
Slave status 0 seconds behind, running, no errors
Slave mode STRICT
Auto-increment increment 2, offset 1
InnoDB version 5.6.27-75.0
1. VERSION MISMATCH - SOFTWARE
5
• Monitoring
• Check the process list on every server
• Scan for port
 nmap -p 3306 –sV 10.77.3.0/24
 Nmap scan report for 10.77.3.238
 Host is up (0.00087s latency).
 PORT STATE SERVICE VERSION
 3306/tcp open mysql MySQL 5.6.27-75.0-log
1. VERSION MISMATCH - SOFTWARE
6
• Between config file and runtime variables
• Between servers in the same replication chain
./pt-config-diff /etc/my.cnf h=localhost
3 config differences
Variable /etc/my.cnf c1-adhoc4-i.us-west2
========================================
innodb_thread_concurrency 0 4
wait_timeout 600 3600
read_only ON OFF
https://www.percona.com/doc/percona-toolkit/2.2/pt-config-diff.html
2. VERSION MISMATCH - CONFIG
7
• Don’t use methods like removing dots from ip addresses
• 10.77.12.3 (1077123)
• 10.77.1.23 (1077123)
• MySQL truncates the server_id if it’s bigger than the max value for an INT(4294967295)
• 192.168.111.222 (192168111222 -> 4294967295)
• 192.168.222.222 (192168222222 -> 4294967295)
• 4508354421957495439 -> 4294967295
• 12354356476576 -> 4294967295
3. MY.CNF – SERVER_ID
8
• Wait_timeout 28800 by default
„Warning: mysql_connect() [function.mysql-connect]: User hircsardasql
already has more than 'max_user_connections' active connections in
/web/hircsarda/hircsarda.hu/wp-includes/wp-db.php on line 1515””
• USE max_user_connections, this will prevent a single app from using all
threads(max_connections)
 gdb -p $pid -ex "set max_connections=3000 --batch
4. MY.CNF – WAIT_TIMEOUT
9
 “mysqld actually permits max_connections+1 clients to connect. The extra
connection is reserved for use by accounts that have the SUPER privilege.”
 https://dev.mysql.com/doc/refman/5.7/en/too-many-connections.html
• GRANT ALL permission comes with SUPER which can write on instances with
read_only = ON
• You can use super-read-only in Percona Server >5.6
• https://www.percona.com/doc/percona-server/5.6/management/super_read_only.html
5. USER AUDIT
10
 Logical
• mysqldump
• mydumper
 Cold
• stop mysql, archive data files
 Snapshots
• LVM(performance overhead)
• EBS snapshots
 Hot or Online
• MySQL Enterprise backup(expensive)
• Percona XtraBackup
6. BACKUP
11
 Why EBS snapshots are great for backups/restore:
• easy to implement
• EC2 uses incremental snapshots
• Easy to provision multiple machines
 Cons
• EBSs are network drives, check the throughput limit for your instance
• (n disks * throughput)+other nw activity< bandwidth limit
• volumes are COLD in the beginning, penalty!
 http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs -ec2-config.html
6. BACKUP - EBS SNAPSHOTS
12
Warming up new 100GB EBS disks - m3.2xlarge EBS optimized instance
 http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs -prewarm.html
6. BACKUP - EBS SNAPSHOTS
Type Warmup Time Warmup Speed
SSD ‘io1’ PIOPS 3000 869s 124 MB/s
generic purpose ‘gp2’
SSD 300/3000
864s 124 MB/s
SSD ‘io1’ PIOPS 1500 1604s 66.8 MB/s
Magnetic ‘standard’ no
iops
4884s 22.0 MB/s
13
“If you access a piece of data that hasn't been loaded yet, the
volume immediately downloads the requested data from Amazon
S3, and then continues loading the rest of the volume's data in the
background. “
 http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html
 EBS types:
• gp2 1TB 3.000 IOPS
• io1 1TB 20.000 IOPS
• magnetic 1TB
 Warming up the data on 2 threads:
355467264 bytes (355 MB) copied, 159.721 s, 2.2 MB/s
475004928 bytes (475 MB) copied, 159.601 s, 3.0 MB/s
 Warming up the data on 3 threads:
 360710144 bytes (361 MB) copied, 195.47 s, 1.8 MB/s
363855872 bytes (364 MB) copied, 195.47 s, 1.9 MB/s
360710144 bytes (361 MB) copied, 195.471 s, 1.8 MB/s
6. BACKUP - EBS SNAPSHOTS
14
 Warming up 20GB (or restore from a backup kept on a snapshot):
 4302.73 s, 5.0 MB/s = 71 minutes
 If we want to warm up a 500GB volume = ~ 30 hours!!!
6. BACKUP - RESTORE FROM EBS
15
 Online open source backup tool from Percona
• Parallel
• Compression
• Enryption
• Streaming
• Throttle
• Doesn’t work with streaming!
• Having multiple MyISAM needs longer period when Flush Tables With Read Lock
 S3 upload/download speed is pretty good:
innobackupex --user=root --password=password --stream=xbstream --
encrypt=AES256 --encrypt-key-file=keyfile --parallel=10 /tmp | pigz –p 2|pv –l
20M | aws s3 cp - s3://bucket/filename.gz
 Do you have (encrypted) offsite backup ?
6. BACKUP - PERCONA XRABACKUP
16
• Backups taken with Xtrabackup are consistent across databases
• Backups are not consistent across clusters (end time matters)
• Consistent restore requires point in time recovery
• mysqlbinlog supports --read-from-remote-server starting from MySQL 5.5
• expire_logs_days = 10 by default
6. BACKUP - MYSQLBINLOG
17
• Disable atime on the data partition
• Disable swap
• Allocate most of the RAM to MySQL
• This will make it the perfect candidate to kill for the OOM-killer
• tmp files goes to /tmp by default
• DDLs on big tables can consume it!
[mysqld]
open_files_limit = 10000
/etc/security/limits.conf:
* hard nofile 10000
* soft nofile 10000
7. OS
18
• “1 pageload = 1 bad query” can be deadly when aggregating a lot of data even on a
small table
 Monitor:
• pt-query-digest
• Anemometer
• Percona Monitoring and Management Query Analyzer
• Vividcortex
 Handle:
• pt-kill
• ProxySQL
• Memcached
8 - QUERIES
19
• INT: Most typical column types for Primary Keys
• UNSIGNED NOT NULL
• A rolled back TX still increases the AUTO_INCREMENT
 https://github.com/RickPizzi/pztools/blob/master/findmax.sh
9 SCHEMA – MAX INTEGER CHECK
20
 “In a Web environment where the clients are connecting from a Web server, a user
could use LOAD DATA LOCAL to read any files that the Web server process has read
access to (assuming that a user could run any command against the SQL server).”
 http://dev.mysql.com/doc/refman/5.6/en/load-data-local.html
 [root@hostdb~]# mysql -e "SHOW GLOBAL VARIABLES LIKE 'local_infile'"
 +---------------+-------+
 | Variable_name | Value |
 +---------------+-------+
 | local_infile | ON |
 +---------------+-------+
 [root@hostdb ~]# mysql -e "show grants for wordpress@%”
 GRANT USAGE ON *.* TO ’wordpress@'localhost' IDENTIFIED BY PASSWORD ‘xxx’
 GRANT SELECT, INSERT ON `wordpress`.* TO ’wordpress'@’%’
10 LOAD DATA LOCAL INFILE
21
 mysql> LOAD DATA LOCAL INFILE '/root/.aws/config' INTO TABLE `wp_comments`
(comment_content) ;
 Query OK, 5 rows affected, 2 warnings (0.00 sec)
 mysql> LOAD DATA LOCAL INFILE '/root/.my.cnf' INTO TABLE `wp_comments`
(comment_content) ;
 Query OK, 3 rows affected, 2 warnings (0.00 sec)
10 LOAD DATA LOCAL INFILE
select comment_content from wp_comments;
[..]
| [default]
| output = json
| region = us-west-2
| aws_access_key_id = AKIAxxxxxxxxx
| aws_secret_access_key = S4xxxxxxxxxxxxxxxxxx
| [client]
| user=root
| password=mysqlpassword
|
22
10 LOAD DATA LOCAL INFILE
23
QUESTIONS?

More Related Content

What's hot

Mysql data replication
Mysql data replicationMysql data replication
Mysql data replicationTuấn Ngô
 
Basic Knowledge on MySql Replication
Basic Knowledge on MySql ReplicationBasic Knowledge on MySql Replication
Basic Knowledge on MySql ReplicationTasawr Interactive
 
High Availabiltity & Replica Sets with mongoDB
High Availabiltity & Replica Sets with mongoDBHigh Availabiltity & Replica Sets with mongoDB
High Availabiltity & Replica Sets with mongoDBGareth Davies
 
Nagios Conference 2014 - Troy Lea - Monitoring VMware Virtualization Using vMA
Nagios Conference 2014 - Troy Lea - Monitoring VMware Virtualization Using vMANagios Conference 2014 - Troy Lea - Monitoring VMware Virtualization Using vMA
Nagios Conference 2014 - Troy Lea - Monitoring VMware Virtualization Using vMANagios
 
Open Source SQL databases enters millions queries per second era
Open Source SQL databases enters millions queries per second eraOpen Source SQL databases enters millions queries per second era
Open Source SQL databases enters millions queries per second eraSveta Smirnova
 
Intro to MySQL Master Slave Replication
Intro to MySQL Master Slave ReplicationIntro to MySQL Master Slave Replication
Intro to MySQL Master Slave Replicationsatejsahu
 
MySQL High Availability Deep Dive
MySQL High Availability Deep DiveMySQL High Availability Deep Dive
MySQL High Availability Deep Divehastexo
 
Deployment Strategy
Deployment StrategyDeployment Strategy
Deployment StrategyMongoDB
 
Intro ProxySQL
Intro ProxySQLIntro ProxySQL
Intro ProxySQLI Goo Lee
 
Nagios Conference 2014 - Jeff Mendoza - Monitoring Microsoft Azure with Nagios
Nagios Conference 2014 - Jeff Mendoza - Monitoring Microsoft Azure with NagiosNagios Conference 2014 - Jeff Mendoza - Monitoring Microsoft Azure with Nagios
Nagios Conference 2014 - Jeff Mendoza - Monitoring Microsoft Azure with NagiosNagios
 
10 Key MongoDB Performance Indicators
10 Key MongoDB Performance Indicators  10 Key MongoDB Performance Indicators
10 Key MongoDB Performance Indicators iammutex
 
MongoDB Performance Tuning and Monitoring
MongoDB Performance Tuning and MonitoringMongoDB Performance Tuning and Monitoring
MongoDB Performance Tuning and MonitoringMongoDB
 
Introduction of mesos persistent storage
Introduction of mesos persistent storageIntroduction of mesos persistent storage
Introduction of mesos persistent storageZhou Weitao
 
Elastic search 클러스터관리
Elastic search 클러스터관리Elastic search 클러스터관리
Elastic search 클러스터관리HyeonSeok Choi
 
Introduction To Apache Mesos
Introduction To Apache MesosIntroduction To Apache Mesos
Introduction To Apache MesosJoe Stein
 
Containerized Data Persistence on Mesos
Containerized Data Persistence on MesosContainerized Data Persistence on Mesos
Containerized Data Persistence on MesosJoe Stein
 
Configuring MongoDB HA Replica Set on AWS EC2
Configuring MongoDB HA Replica Set on AWS EC2Configuring MongoDB HA Replica Set on AWS EC2
Configuring MongoDB HA Replica Set on AWS EC2ShepHertz
 
MongoDB in Windows Azure - Evgeniy Maliy - Dnipropetrovsk MUG 140303
MongoDB in Windows Azure - Evgeniy Maliy - Dnipropetrovsk MUG 140303 MongoDB in Windows Azure - Evgeniy Maliy - Dnipropetrovsk MUG 140303
MongoDB in Windows Azure - Evgeniy Maliy - Dnipropetrovsk MUG 140303 Victoria Malaya
 

What's hot (20)

Mysql data replication
Mysql data replicationMysql data replication
Mysql data replication
 
Basic Knowledge on MySql Replication
Basic Knowledge on MySql ReplicationBasic Knowledge on MySql Replication
Basic Knowledge on MySql Replication
 
High Availabiltity & Replica Sets with mongoDB
High Availabiltity & Replica Sets with mongoDBHigh Availabiltity & Replica Sets with mongoDB
High Availabiltity & Replica Sets with mongoDB
 
Nagios Conference 2014 - Troy Lea - Monitoring VMware Virtualization Using vMA
Nagios Conference 2014 - Troy Lea - Monitoring VMware Virtualization Using vMANagios Conference 2014 - Troy Lea - Monitoring VMware Virtualization Using vMA
Nagios Conference 2014 - Troy Lea - Monitoring VMware Virtualization Using vMA
 
Open Source SQL databases enters millions queries per second era
Open Source SQL databases enters millions queries per second eraOpen Source SQL databases enters millions queries per second era
Open Source SQL databases enters millions queries per second era
 
Intro to MySQL Master Slave Replication
Intro to MySQL Master Slave ReplicationIntro to MySQL Master Slave Replication
Intro to MySQL Master Slave Replication
 
MySQL High Availability Deep Dive
MySQL High Availability Deep DiveMySQL High Availability Deep Dive
MySQL High Availability Deep Dive
 
Deployment Strategy
Deployment StrategyDeployment Strategy
Deployment Strategy
 
Intro ProxySQL
Intro ProxySQLIntro ProxySQL
Intro ProxySQL
 
Nagios Conference 2014 - Jeff Mendoza - Monitoring Microsoft Azure with Nagios
Nagios Conference 2014 - Jeff Mendoza - Monitoring Microsoft Azure with NagiosNagios Conference 2014 - Jeff Mendoza - Monitoring Microsoft Azure with Nagios
Nagios Conference 2014 - Jeff Mendoza - Monitoring Microsoft Azure with Nagios
 
10 Key MongoDB Performance Indicators
10 Key MongoDB Performance Indicators  10 Key MongoDB Performance Indicators
10 Key MongoDB Performance Indicators
 
Elastic stack
Elastic stackElastic stack
Elastic stack
 
Dbdeployer
DbdeployerDbdeployer
Dbdeployer
 
MongoDB Performance Tuning and Monitoring
MongoDB Performance Tuning and MonitoringMongoDB Performance Tuning and Monitoring
MongoDB Performance Tuning and Monitoring
 
Introduction of mesos persistent storage
Introduction of mesos persistent storageIntroduction of mesos persistent storage
Introduction of mesos persistent storage
 
Elastic search 클러스터관리
Elastic search 클러스터관리Elastic search 클러스터관리
Elastic search 클러스터관리
 
Introduction To Apache Mesos
Introduction To Apache MesosIntroduction To Apache Mesos
Introduction To Apache Mesos
 
Containerized Data Persistence on Mesos
Containerized Data Persistence on MesosContainerized Data Persistence on Mesos
Containerized Data Persistence on Mesos
 
Configuring MongoDB HA Replica Set on AWS EC2
Configuring MongoDB HA Replica Set on AWS EC2Configuring MongoDB HA Replica Set on AWS EC2
Configuring MongoDB HA Replica Set on AWS EC2
 
MongoDB in Windows Azure - Evgeniy Maliy - Dnipropetrovsk MUG 140303
MongoDB in Windows Azure - Evgeniy Maliy - Dnipropetrovsk MUG 140303 MongoDB in Windows Azure - Evgeniy Maliy - Dnipropetrovsk MUG 140303
MongoDB in Windows Azure - Evgeniy Maliy - Dnipropetrovsk MUG 140303
 

Viewers also liked

Introduction to monitoring
Introduction to monitoringIntroduction to monitoring
Introduction to monitoringJanos Ruszo
 
Agile Fundamentals and Best Practices (with Trello)
Agile Fundamentals and Best Practices (with Trello)Agile Fundamentals and Best Practices (with Trello)
Agile Fundamentals and Best Practices (with Trello)Filippo Zanella
 
More mastering the art of indexing
More mastering the art of indexingMore mastering the art of indexing
More mastering the art of indexingYoshinori Matsunobu
 
Des principes de la démarche DevOps à sa mise en oeuvre
Des principes de la démarche DevOps à sa mise en oeuvreDes principes de la démarche DevOps à sa mise en oeuvre
Des principes de la démarche DevOps à sa mise en oeuvreStephane Manciot
 
ProxySQL - High Performance and HA Proxy for MySQL
ProxySQL - High Performance and HA Proxy for MySQLProxySQL - High Performance and HA Proxy for MySQL
ProxySQL - High Performance and HA Proxy for MySQLRené Cannaò
 
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricksQuery Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricksJaime Crespo
 
Galera cluster for MySQL - Introduction Slides
Galera cluster for MySQL - Introduction SlidesGalera cluster for MySQL - Introduction Slides
Galera cluster for MySQL - Introduction SlidesSeveralnines
 
DevOps avec Ansible et Docker
DevOps avec Ansible et DockerDevOps avec Ansible et Docker
DevOps avec Ansible et DockerStephane Manciot
 
Percona Live 2012PPT: MySQL Query optimization
Percona Live 2012PPT: MySQL Query optimizationPercona Live 2012PPT: MySQL Query optimization
Percona Live 2012PPT: MySQL Query optimizationmysqlops
 
Laracon Online: Grid and Flexbox
Laracon Online: Grid and FlexboxLaracon Online: Grid and Flexbox
Laracon Online: Grid and FlexboxRachel Andrew
 

Viewers also liked (11)

Introduction to monitoring
Introduction to monitoringIntroduction to monitoring
Introduction to monitoring
 
Agile Fundamentals and Best Practices (with Trello)
Agile Fundamentals and Best Practices (with Trello)Agile Fundamentals and Best Practices (with Trello)
Agile Fundamentals and Best Practices (with Trello)
 
More mastering the art of indexing
More mastering the art of indexingMore mastering the art of indexing
More mastering the art of indexing
 
Des principes de la démarche DevOps à sa mise en oeuvre
Des principes de la démarche DevOps à sa mise en oeuvreDes principes de la démarche DevOps à sa mise en oeuvre
Des principes de la démarche DevOps à sa mise en oeuvre
 
ProxySQL - High Performance and HA Proxy for MySQL
ProxySQL - High Performance and HA Proxy for MySQLProxySQL - High Performance and HA Proxy for MySQL
ProxySQL - High Performance and HA Proxy for MySQL
 
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricksQuery Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
 
Galera cluster for MySQL - Introduction Slides
Galera cluster for MySQL - Introduction SlidesGalera cluster for MySQL - Introduction Slides
Galera cluster for MySQL - Introduction Slides
 
DevOps avec Ansible et Docker
DevOps avec Ansible et DockerDevOps avec Ansible et Docker
DevOps avec Ansible et Docker
 
How to Design Indexes, Really
How to Design Indexes, ReallyHow to Design Indexes, Really
How to Design Indexes, Really
 
Percona Live 2012PPT: MySQL Query optimization
Percona Live 2012PPT: MySQL Query optimizationPercona Live 2012PPT: MySQL Query optimization
Percona Live 2012PPT: MySQL Query optimization
 
Laracon Online: Grid and Flexbox
Laracon Online: Grid and FlexboxLaracon Online: Grid and Flexbox
Laracon Online: Grid and Flexbox
 

Similar to How (not) to kill your MySQL infrastructure

Infrastructure review - Shining a light on the Black Box
Infrastructure review - Shining a light on the Black BoxInfrastructure review - Shining a light on the Black Box
Infrastructure review - Shining a light on the Black BoxMiklos Szel
 
Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)MongoDB
 
MySQL database replication
MySQL database replicationMySQL database replication
MySQL database replicationPoguttuezhiniVP
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalabilityWim Godden
 
Deployment Strategies
Deployment StrategiesDeployment Strategies
Deployment StrategiesMongoDB
 
Empowering Congress with Data-Driven Analytics (BDT304) | AWS re:Invent 2013
Empowering Congress with Data-Driven Analytics (BDT304) | AWS re:Invent 2013Empowering Congress with Data-Driven Analytics (BDT304) | AWS re:Invent 2013
Empowering Congress with Data-Driven Analytics (BDT304) | AWS re:Invent 2013Amazon Web Services
 
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014Amazon Web Services
 
MySQL 101 PHPTek 2017
MySQL 101 PHPTek 2017MySQL 101 PHPTek 2017
MySQL 101 PHPTek 2017Dave Stokes
 
Oracle 11g R2 RAC setup on rhel 5.0
Oracle 11g R2 RAC setup on rhel 5.0Oracle 11g R2 RAC setup on rhel 5.0
Oracle 11g R2 RAC setup on rhel 5.0Santosh Kangane
 
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest Lenz Grimmer
 
Loadays MySQL
Loadays MySQLLoadays MySQL
Loadays MySQLlefredbe
 
Grabbing the PostgreSQL Elephant by the Trunk
Grabbing the PostgreSQL Elephant by the TrunkGrabbing the PostgreSQL Elephant by the Trunk
Grabbing the PostgreSQL Elephant by the TrunkHarold Giménez
 
Oracle to Postgres Migration - part 2
Oracle to Postgres Migration - part 2Oracle to Postgres Migration - part 2
Oracle to Postgres Migration - part 2PgTraining
 
Finding an unusual cause of max_user_connections in MySQL
Finding an unusual cause of max_user_connections in MySQLFinding an unusual cause of max_user_connections in MySQL
Finding an unusual cause of max_user_connections in MySQLOlivier Doucet
 
The Proto-Burst Buffer: Experience with the flash-based file system on SDSC's...
The Proto-Burst Buffer: Experience with the flash-based file system on SDSC's...The Proto-Burst Buffer: Experience with the flash-based file system on SDSC's...
The Proto-Burst Buffer: Experience with the flash-based file system on SDSC's...Glenn K. Lockwood
 
Oracle Performance On Linux X86 systems
Oracle  Performance On Linux  X86 systems Oracle  Performance On Linux  X86 systems
Oracle Performance On Linux X86 systems Baruch Osoveskiy
 
Optimizing elastic search on google compute engine
Optimizing elastic search on google compute engineOptimizing elastic search on google compute engine
Optimizing elastic search on google compute engineBhuvaneshwaran R
 
Running ElasticSearch on Google Compute Engine in Production
Running ElasticSearch on Google Compute Engine in ProductionRunning ElasticSearch on Google Compute Engine in Production
Running ElasticSearch on Google Compute Engine in ProductionSearce Inc
 
The Proper Care and Feeding of MySQL Databases
The Proper Care and Feeding of MySQL DatabasesThe Proper Care and Feeding of MySQL Databases
The Proper Care and Feeding of MySQL DatabasesDave Stokes
 

Similar to How (not) to kill your MySQL infrastructure (20)

Infrastructure review - Shining a light on the Black Box
Infrastructure review - Shining a light on the Black BoxInfrastructure review - Shining a light on the Black Box
Infrastructure review - Shining a light on the Black Box
 
Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)Deployment Strategies (Mongo Austin)
Deployment Strategies (Mongo Austin)
 
Mysql ppt
Mysql pptMysql ppt
Mysql ppt
 
MySQL database replication
MySQL database replicationMySQL database replication
MySQL database replication
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalability
 
Deployment Strategies
Deployment StrategiesDeployment Strategies
Deployment Strategies
 
Empowering Congress with Data-Driven Analytics (BDT304) | AWS re:Invent 2013
Empowering Congress with Data-Driven Analytics (BDT304) | AWS re:Invent 2013Empowering Congress with Data-Driven Analytics (BDT304) | AWS re:Invent 2013
Empowering Congress with Data-Driven Analytics (BDT304) | AWS re:Invent 2013
 
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
(WEB401) Optimizing Your Web Server on AWS | AWS re:Invent 2014
 
MySQL 101 PHPTek 2017
MySQL 101 PHPTek 2017MySQL 101 PHPTek 2017
MySQL 101 PHPTek 2017
 
Oracle 11g R2 RAC setup on rhel 5.0
Oracle 11g R2 RAC setup on rhel 5.0Oracle 11g R2 RAC setup on rhel 5.0
Oracle 11g R2 RAC setup on rhel 5.0
 
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest
 
Loadays MySQL
Loadays MySQLLoadays MySQL
Loadays MySQL
 
Grabbing the PostgreSQL Elephant by the Trunk
Grabbing the PostgreSQL Elephant by the TrunkGrabbing the PostgreSQL Elephant by the Trunk
Grabbing the PostgreSQL Elephant by the Trunk
 
Oracle to Postgres Migration - part 2
Oracle to Postgres Migration - part 2Oracle to Postgres Migration - part 2
Oracle to Postgres Migration - part 2
 
Finding an unusual cause of max_user_connections in MySQL
Finding an unusual cause of max_user_connections in MySQLFinding an unusual cause of max_user_connections in MySQL
Finding an unusual cause of max_user_connections in MySQL
 
The Proto-Burst Buffer: Experience with the flash-based file system on SDSC's...
The Proto-Burst Buffer: Experience with the flash-based file system on SDSC's...The Proto-Burst Buffer: Experience with the flash-based file system on SDSC's...
The Proto-Burst Buffer: Experience with the flash-based file system on SDSC's...
 
Oracle Performance On Linux X86 systems
Oracle  Performance On Linux  X86 systems Oracle  Performance On Linux  X86 systems
Oracle Performance On Linux X86 systems
 
Optimizing elastic search on google compute engine
Optimizing elastic search on google compute engineOptimizing elastic search on google compute engine
Optimizing elastic search on google compute engine
 
Running ElasticSearch on Google Compute Engine in Production
Running ElasticSearch on Google Compute Engine in ProductionRunning ElasticSearch on Google Compute Engine in Production
Running ElasticSearch on Google Compute Engine in Production
 
The Proper Care and Feeding of MySQL Databases
The Proper Care and Feeding of MySQL DatabasesThe Proper Care and Feeding of MySQL Databases
The Proper Care and Feeding of MySQL Databases
 

Recently uploaded

Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoordharasingh5698
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 

Recently uploaded (20)

Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 

How (not) to kill your MySQL infrastructure

  • 1. HOW (NOT) TO KILL YOUR MYSQL INFRASTRUCTURE Based on true stories
  • 2. 2 • Miklos ‘Mukka’ Szel • From Hungary • Started using Linux in 1997 and MySQL in 2000, used to be a backend developer • Worked for Own Startup, ISP, Walt Disney(ESPN,Cricinfo), PalominoDB/Pythian • Freelance Consultant since 2015 - Edmodo /ME
  • 3. 3 Ansible: - name: Install MySQL-Oracle Server yum: pkg={{ item }} state=present with_items: - MySQL-server - MySQL-client Centos/Redhat: yum install MySQL-server Debian/Ubuntu: apt-get install percona-server-server-5.6 1. VERSION MISMATCH - SOFTWARE
  • 4. 4 ./pt-slave-find --host 10.77.3.181 -u root--ask-pass Enter password: 10.77.24.181 Version 5.6.32-78.1-log Server ID 134 Uptime 318+06:01:55 (started 2015-11-19T02:42:03) Replication Is not a slave, has 1 slaves connected, is not read_only Filters Binary logging MIXED Slave status Slave mode STRICT InnoDB version 5.6.32-78.1 +- 10.77.25.17 Version 5.6.27-75.0-log Server ID 143 Uptime 167+18:21:03 (started 2016 -04-17T14:22:55) Replication Is a slave, has 0 slaves connected, is read_only Filters Binary logging MIXED Slave status 0 seconds behind, running, no errors Slave mode STRICT Auto-increment increment 2, offset 1 InnoDB version 5.6.27-75.0 1. VERSION MISMATCH - SOFTWARE
  • 5. 5 • Monitoring • Check the process list on every server • Scan for port  nmap -p 3306 –sV 10.77.3.0/24  Nmap scan report for 10.77.3.238  Host is up (0.00087s latency).  PORT STATE SERVICE VERSION  3306/tcp open mysql MySQL 5.6.27-75.0-log 1. VERSION MISMATCH - SOFTWARE
  • 6. 6 • Between config file and runtime variables • Between servers in the same replication chain ./pt-config-diff /etc/my.cnf h=localhost 3 config differences Variable /etc/my.cnf c1-adhoc4-i.us-west2 ======================================== innodb_thread_concurrency 0 4 wait_timeout 600 3600 read_only ON OFF https://www.percona.com/doc/percona-toolkit/2.2/pt-config-diff.html 2. VERSION MISMATCH - CONFIG
  • 7. 7 • Don’t use methods like removing dots from ip addresses • 10.77.12.3 (1077123) • 10.77.1.23 (1077123) • MySQL truncates the server_id if it’s bigger than the max value for an INT(4294967295) • 192.168.111.222 (192168111222 -> 4294967295) • 192.168.222.222 (192168222222 -> 4294967295) • 4508354421957495439 -> 4294967295 • 12354356476576 -> 4294967295 3. MY.CNF – SERVER_ID
  • 8. 8 • Wait_timeout 28800 by default „Warning: mysql_connect() [function.mysql-connect]: User hircsardasql already has more than 'max_user_connections' active connections in /web/hircsarda/hircsarda.hu/wp-includes/wp-db.php on line 1515”” • USE max_user_connections, this will prevent a single app from using all threads(max_connections)  gdb -p $pid -ex "set max_connections=3000 --batch 4. MY.CNF – WAIT_TIMEOUT
  • 9. 9  “mysqld actually permits max_connections+1 clients to connect. The extra connection is reserved for use by accounts that have the SUPER privilege.”  https://dev.mysql.com/doc/refman/5.7/en/too-many-connections.html • GRANT ALL permission comes with SUPER which can write on instances with read_only = ON • You can use super-read-only in Percona Server >5.6 • https://www.percona.com/doc/percona-server/5.6/management/super_read_only.html 5. USER AUDIT
  • 10. 10  Logical • mysqldump • mydumper  Cold • stop mysql, archive data files  Snapshots • LVM(performance overhead) • EBS snapshots  Hot or Online • MySQL Enterprise backup(expensive) • Percona XtraBackup 6. BACKUP
  • 11. 11  Why EBS snapshots are great for backups/restore: • easy to implement • EC2 uses incremental snapshots • Easy to provision multiple machines  Cons • EBSs are network drives, check the throughput limit for your instance • (n disks * throughput)+other nw activity< bandwidth limit • volumes are COLD in the beginning, penalty!  http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs -ec2-config.html 6. BACKUP - EBS SNAPSHOTS
  • 12. 12 Warming up new 100GB EBS disks - m3.2xlarge EBS optimized instance  http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs -prewarm.html 6. BACKUP - EBS SNAPSHOTS Type Warmup Time Warmup Speed SSD ‘io1’ PIOPS 3000 869s 124 MB/s generic purpose ‘gp2’ SSD 300/3000 864s 124 MB/s SSD ‘io1’ PIOPS 1500 1604s 66.8 MB/s Magnetic ‘standard’ no iops 4884s 22.0 MB/s
  • 13. 13 “If you access a piece of data that hasn't been loaded yet, the volume immediately downloads the requested data from Amazon S3, and then continues loading the rest of the volume's data in the background. “  http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html  EBS types: • gp2 1TB 3.000 IOPS • io1 1TB 20.000 IOPS • magnetic 1TB  Warming up the data on 2 threads: 355467264 bytes (355 MB) copied, 159.721 s, 2.2 MB/s 475004928 bytes (475 MB) copied, 159.601 s, 3.0 MB/s  Warming up the data on 3 threads:  360710144 bytes (361 MB) copied, 195.47 s, 1.8 MB/s 363855872 bytes (364 MB) copied, 195.47 s, 1.9 MB/s 360710144 bytes (361 MB) copied, 195.471 s, 1.8 MB/s 6. BACKUP - EBS SNAPSHOTS
  • 14. 14  Warming up 20GB (or restore from a backup kept on a snapshot):  4302.73 s, 5.0 MB/s = 71 minutes  If we want to warm up a 500GB volume = ~ 30 hours!!! 6. BACKUP - RESTORE FROM EBS
  • 15. 15  Online open source backup tool from Percona • Parallel • Compression • Enryption • Streaming • Throttle • Doesn’t work with streaming! • Having multiple MyISAM needs longer period when Flush Tables With Read Lock  S3 upload/download speed is pretty good: innobackupex --user=root --password=password --stream=xbstream -- encrypt=AES256 --encrypt-key-file=keyfile --parallel=10 /tmp | pigz –p 2|pv –l 20M | aws s3 cp - s3://bucket/filename.gz  Do you have (encrypted) offsite backup ? 6. BACKUP - PERCONA XRABACKUP
  • 16. 16 • Backups taken with Xtrabackup are consistent across databases • Backups are not consistent across clusters (end time matters) • Consistent restore requires point in time recovery • mysqlbinlog supports --read-from-remote-server starting from MySQL 5.5 • expire_logs_days = 10 by default 6. BACKUP - MYSQLBINLOG
  • 17. 17 • Disable atime on the data partition • Disable swap • Allocate most of the RAM to MySQL • This will make it the perfect candidate to kill for the OOM-killer • tmp files goes to /tmp by default • DDLs on big tables can consume it! [mysqld] open_files_limit = 10000 /etc/security/limits.conf: * hard nofile 10000 * soft nofile 10000 7. OS
  • 18. 18 • “1 pageload = 1 bad query” can be deadly when aggregating a lot of data even on a small table  Monitor: • pt-query-digest • Anemometer • Percona Monitoring and Management Query Analyzer • Vividcortex  Handle: • pt-kill • ProxySQL • Memcached 8 - QUERIES
  • 19. 19 • INT: Most typical column types for Primary Keys • UNSIGNED NOT NULL • A rolled back TX still increases the AUTO_INCREMENT  https://github.com/RickPizzi/pztools/blob/master/findmax.sh 9 SCHEMA – MAX INTEGER CHECK
  • 20. 20  “In a Web environment where the clients are connecting from a Web server, a user could use LOAD DATA LOCAL to read any files that the Web server process has read access to (assuming that a user could run any command against the SQL server).”  http://dev.mysql.com/doc/refman/5.6/en/load-data-local.html  [root@hostdb~]# mysql -e "SHOW GLOBAL VARIABLES LIKE 'local_infile'"  +---------------+-------+  | Variable_name | Value |  +---------------+-------+  | local_infile | ON |  +---------------+-------+  [root@hostdb ~]# mysql -e "show grants for wordpress@%”  GRANT USAGE ON *.* TO ’wordpress@'localhost' IDENTIFIED BY PASSWORD ‘xxx’  GRANT SELECT, INSERT ON `wordpress`.* TO ’wordpress'@’%’ 10 LOAD DATA LOCAL INFILE
  • 21. 21  mysql> LOAD DATA LOCAL INFILE '/root/.aws/config' INTO TABLE `wp_comments` (comment_content) ;  Query OK, 5 rows affected, 2 warnings (0.00 sec)  mysql> LOAD DATA LOCAL INFILE '/root/.my.cnf' INTO TABLE `wp_comments` (comment_content) ;  Query OK, 3 rows affected, 2 warnings (0.00 sec) 10 LOAD DATA LOCAL INFILE select comment_content from wp_comments; [..] | [default] | output = json | region = us-west-2 | aws_access_key_id = AKIAxxxxxxxxx | aws_secret_access_key = S4xxxxxxxxxxxxxxxxxx | [client] | user=root | password=mysqlpassword |
  • 22. 22 10 LOAD DATA LOCAL INFILE