MySQL BREAK/FIX LAB. Presented by: Alkin Tezuysal, Gillian Gunson, René Cannaò April 1, 2014

Size: px
Start display at page:

Download "MySQL BREAK/FIX LAB. Presented by: Alkin Tezuysal, Gillian Gunson, René Cannaò April 1, 2014"

Transcription

1 MySQL BREAK/FIX LAB Presented by: Alkin Tezuysal, Gillian Gunson, René Cannaò April 1, 214

2 Who we are: black bird /blackbird/ noun 1. (of a people) constantly in a state of shock caused by series of incidents.

3 Tutorial Agenda Fix standalone MySQL instance Replication issues Performance issues

4 Getting started Each attendee has its own instance (not shared) we break it, you fix it :-) One standalone MySQL instance Several MySQL instances using MySQL sandbox

5 Getting started Access: Username/password: user-lab / blackbirdlab123 ssh Pre-requirement: ssh client

6 Agenda - Part 1 Recover a mysql instance unable to start misconfiguration files permission corrupted files Connectivity issues misconfiguration recover password server gone away Learn how to troubleshoot crash read error log fix misconfiguration tune variables

7 Start mysqld ~]# ps aux grep mysql root pts/2 S+ 13:8 : grep mysql ~]# service mysqld start chown: invalid user: `mysql:mysql' chown: invalid user: `mysql:mysql' Initializing MySQL database: chown: invalid user: `mysql' Cannot change ownership of the database directories to the 'mysql' user. Check that you have the necessary permissions and try again. [FAILED] chown: invalid user: `mysql:mysql'

8 mysql user ~]# id mysql id: mysql: No such user ~]# useradd mysql ~]# id mysql uid=5(mysql) gid=51(mysql) groups=51(mysql)

9 Unknown variable ~]# service mysqld start Initializing MySQL database: Installing MySQL system tables :19:9 [ERROR] /usr/libexec/mysqld: unknown variable 'tmpd1r=/var/tmp' :19:9 [ERROR] Aborting :19:9 [Note] /usr/libexec/mysqld: Shutdown complete [FAILED] ~]#!ps ps aux grep mysql root pts/2 S+ 13:19 : grep mysql

10 Which config file? ~]# grep tmpd /etc/my.cnf ~]# grep tmpd /etc/mysql/my.cnf grep: /etc/mysql/my.cnf: No such file or directory Multiple configuration file(s)?? The easy way: https://dev.mysql.com/doc/refman/5.5/en/option-files.html The hard way: strace

11 strace ~]# strace mysqld strace: mysqld: command not found ~]# strace /usr/libexec/mysqld ~]# strace -e trace=open,stat /usr/libexec/mysqld... stat("/etc/my.cnf", {st_mode=s_ifreg644, st_size=243,...}) = open("/etc/my.cnf", O_RDONLY) = 3 stat("/etc/mysql/my.cnf", x7fffea4cd8) = -1 ENOENT (No such file or directory) stat("/usr/etc/my.cnf", {st_mode=s_ifreg644, st_size=25,...}) = open("/usr/etc/my.cnf", O_RDONLY) = 3 stat("/root/.my.cnf", {st_mode=s_ifreg644, st_size=33,...}) = open("/root/.my.cnf", O_RDONLY) = 3...

12 strace : mysqld --print-defaults # strace -e stat64 /usr/libexec/mysqld --print-defaults stat64("/etc/my.cnf", xbfb9d75) = -1 ENOENT (No such file or directory) stat64("/etc/mysql/my.cnf", {st_mode=s_ifreg644, st_size=3564,...}) = stat64("/usr/etc/my.cnf", xbfb9d75) = -1 ENOENT (No such file or directory) stat64("/root/.my.cnf", xbfb9d75) = -1 ENOENT (No such file or directory) mysqld would have been started with the following arguments: --user=mysql --socket=/var/run/mysqld/mysqld.sock --port=336 --basedir=/usr -datadir=/var/lib/mysql --tmpdir=/tmp --skip-external-locking --bind-address= key_buffer=16m --max_allowed_packet=16m --thread_stack=192k -thread_cache_size=8 --myisam-recover=backup --query_cache_limit=1m -query_cache_size=16m --log_error=/var/log/mysql/error.log --expire_logs_days=1 -max_binlog_size=1m

13 Fix tmpdir ~]# cat /usr/etc/my.cnf [mysqld] tmpd1r=/var/tmp ~]# sed -i -e 's/tmpd1r/tmpdir/' /usr/etc/my.cnf ~]# cat /usr/etc/my.cnf [mysqld] tmpdir=/var/tmp

14 Start again ~]# service mysqld start MySQL Daemon failed to start. Starting mysqld:?? Not very descriptive output [FAILED]

15 Check error log ~]# cat /var/log/mysqld.log :5: mysqld_safe Starting mysqld daemon with databases from /var/lib/msql :5: [Note] Plugin 'FEDERATED' is disabled. /usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist :5: [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it :5: InnoDB: The InnoDB memory heap is disabled :5: InnoDB: Mutexes and rw_locks use GCC atomic builtins :5: InnoDB: Compressed tables use zlib :5: InnoDB: Using Linux native AIO /usr/libexec/mysqld: Can't create/write to file '/var/tmp/iblmkyv' (Errcode: 13) :5: InnoDB: Error: unable to create temporary file; errno: :5: [ERROR] Plugin 'InnoDB' init function returned error :5: [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed :5: [ERROR] Unknown/unsupported storage engine: InnoDB :5: [ERROR] Aborting :5: [Note] /usr/libexec/mysqld: Shutdown complete :5: mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

16 Fix permissions -rw-rw rw-rw rw-rw ~]# ls -l root root root root root root /var/lib/mysql/mysql/plugin.* 8586 Mar 13 12:3 /var/lib/mysql/mysql/plugin.frm Mar 13 12:3 /var/lib/mysql/mysql/plugin.myd 124 Mar 13 12:3 /var/lib/mysql/mysql/plugin.myi ~]# chown -R mysql:mysql /var/lib/mysql/mysql/ ~]# service mysqld start MySQL Daemon failed to start. Starting mysqld: [FAILED]

17 Check error log :23:4 mysqld_safe Starting mysqld daemon with databases from /var/lib/msql :23:4 [Note] Plugin 'FEDERATED' is disabled. /usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist :23:4 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it :23:4 InnoDB: The InnoDB memory heap is disabled :23:4 InnoDB: Mutexes and rw_locks use GCC atomic builtins :23:4 InnoDB: Compressed tables use zlib :23:4 InnoDB: Using Linux native AIO /usr/libexec/mysqld: Can't create/write to file '/var/tmp/ib9c5cf6' (Errcode: 13) :23:5 InnoDB: Error: unable to create temporary file; errno: :23:5 [ERROR] Plugin 'InnoDB' init function returned error :23:5 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed :23:5 [ERROR] Unknown/unsupported storage engine: InnoDB :23:5 [ERROR] Aborting :23:5 [Note] /usr/libexec/mysqld: Shutdown complete :23:5 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

18 Fix datadir path ~]# grep datadir /etc/my.cnf datadir=/var/lib/msql ~]# sed -i -e 's/datadir=\/var\/lib\/msql/datadir=\/var\/lib\/mysql/' /etc/my.cnf ~]# grep datadir /etc/my.cnf datadir=/var/lib/mysql

19 Check error log :51:6 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql :51:6 [Note] Plugin 'FEDERATED' is disabled :51:6 InnoDB: The InnoDB memory heap is disabled :51:6 InnoDB: Mutexes and rw_locks use GCC atomic builtins :51:6 InnoDB: Compressed tables use zlib :51:6 InnoDB: Using Linux native AIO /usr/libexec/mysqld: Can't create/write to file '/var/tmp/ibzhtuux' (Errcode: 13) :51:6 InnoDB: Error: unable to create temporary file; errno: :51:6 [ERROR] Plugin 'InnoDB' init function returned error :51:6 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed :51:6 [ERROR] Unknown/unsupported storage engine: InnoDB :51:6 [ERROR] Aborting :51:6 [Note] /usr/libexec/mysqld: Shutdown complete :51:6 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

20 Fix tmpdir ~]# ls -ld /var/tmp drwxrwx--t 2 root root 496 Mar 13 13:23 /var/tmp ~]# chmod a+rwx /var/tmp ~]# ls -ld /var/tmp drwxrwxrwt 2 root root 496 Mar 13 13:23 /var/tmp ~]# service mysqld start MySQL Daemon failed to start. Starting mysqld: [FAILED]

21 Cannot allocate memory :58:48 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql :58:48 [Note] Plugin 'FEDERATED' is disabled :58:48 InnoDB: The InnoDB memory heap is disabled :58:48 InnoDB: Mutexes and rw_locks use GCC atomic builtins :58:48 InnoDB: Compressed tables use zlib :58:48 InnoDB: Using Linux native AIO :58:48 InnoDB: Initializing buffer pool, size = 1.G InnoDB: mmap( bytes) failed; errno :58:48 InnoDB: Completed initialization of buffer pool :58:48 InnoDB: Fatal error: cannot allocate memory for the buffer pool :58:48 [ERROR] Plugin 'InnoDB' init function returned error :58:48 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed :58:48 [ERROR] Unknown/unsupported storage engine: InnoDB :58:48 [ERROR] Aborting :58:48 [Note] /usr/libexec/mysqld: Shutdown complete :58:48 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

22 Fix innodb_buffer_pool_size ~]# perror 12 OS error code 12: Cannot allocate memory ~]# grep 1 /etc/my.cnf innodb_buffer_pool_size=1g ~]# sed -i -e 's/1g/256m/' /etc/my.cnf ~]# grep innodb_buffer_pool_size /etc/my.cnf innodb_buffer_pool_size=256m ~]# service mysqld start MySQL Daemon failed to start. Starting mysqld: [FAILED]

23 Again error :11:57 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql :11:57 [Note] Plugin 'FEDERATED' is disabled :11:57 InnoDB: The InnoDB memory heap is disabled :11:57 InnoDB: Mutexes and rw_locks use GCC atomic builtins :11:57 InnoDB: Compressed tables use zlib :11:57 InnoDB: Using Linux native AIO :11:57 InnoDB: Initializing buffer pool, size = 256.M :11:57 InnoDB: Completed initialization of buffer pool :11:57 InnoDB: Operating system error number 13 in a file operation. InnoDB: The error means mysqld does not have the access rights to InnoDB: the directory. InnoDB: File name./ibdata1 InnoDB: File operation call: 'open'. InnoDB: Cannot continue operation :11:57 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

24 Fix permissions -rw-rw total rw-rw rw-rw rw-rw drwx drwx drwx ~]# ls -l /var/lib/mysql/ibdata Mar 13 12:34 /var/lib/mysql/ibdata1 ~]# ls -l /var/lib/mysql mysql root root Mar 13 12:34 ibdata Mar 13 12:34 ib_logfile Mar 13 12:34 ib_logfile1 mysql 496 Mar 13 12:3 mysql root 496 Mar 13 12:3 performance_schema root 496 Mar 13 12:3 test ~]# chown -R mysql:mysql /var/lib/mysql ~]# service mysqld start MySQL Daemon failed to start. Starting mysqld: [FAILED]

25 innodb_log_file_size :15: mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql :15: [Note] Plugin 'FEDERATED' is disabled :15: InnoDB: The InnoDB memory heap is disabled :15: InnoDB: Mutexes and rw_locks use GCC atomic builtins :15: InnoDB: Compressed tables use zlib :15: InnoDB: Using Linux native AIO :15: InnoDB: Initializing buffer pool, size = 256.M :15:1 InnoDB: Completed initialization of buffer pool InnoDB: Error: log file./ib_logfile is of different size bytes InnoDB: than specified in the.cnf file bytes! :15:1 [ERROR] Plugin 'InnoDB' init function returned error :15:1 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed :15:1 [ERROR] Unknown/unsupported storage engine: InnoDB :15:1 [ERROR] Aborting :15:1 [Note] /usr/libexec/mysqld: Shutdown complete :15:1 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

26 Fix innodb_log_file_size ~]# grep innodb_log_file_size /etc/my.cnf innodb_log_file_size=64m ~]# ls -l /var/lib/mysql/ib_logfile* -rw-rw mysql mysql Mar 13 12:34 /var/lib/mysql/ib_logfile -rw-rw mysql mysql Mar 13 12:34 /var/lib/mysql/ib_logfile1 ~]# sed -i -e 's/innodb_log_file_size=64m/innodb_log_file_size=32m/' /etc/my.cnf ~]# grep innodb_log_file_size /etc/my.cnf innodb_log_file_size=32m ~]# service mysqld start Starting mysqld: [ OK ]

27 Access to mysqld ~]# mysql ERROR 22 (HY): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) ~]# perror 2 OS error code 2: No such file or directory ~]# ls -l /tmp/mysql.sock ls: cannot access /tmp/mysql.sock: No such file or directory

28 Access to mysqld ~]# grep socket /var/log/mysqld.log tail -n 1 Version: '5.5.34' socket: '/var/lib/mysql/mysql.sock' port: 336 Community Server (GPL) ~]# lsof -n grep mysqld grep unix mysqld mysql 12u unix xffff882edd4 t /var/lib/mysql/mysql.sock In /etc/my.cnf : [client] socket=/tmp/mysql.sock MySQL 22829

29 Access to mysqld ~]# mysql ERROR 145 (28): Access denied for user (using password: YES) ~]# strace -e trace=open mysql open("/etc/my.cnf", O_RDONLY) = 3 open("/usr/etc/my.cnf", O_RDONLY) = 3 open("/root/.my.cnf", O_RDONLY) = 3 ~]# cat ~/.my.cnf [client] password=adummypassword

30 Access to mysqld ~]# mysql --no-defaults ~]# mysql -p

31 Change root password ~]# echo "SET PASSWORD=PASSWORD('$RANDOM$RANDOM')" mysql ~]# mysql ERROR 145 (28): Access denied for user (using password: NO) In /etc/my.cnf : skip-grant-tables ~]# service mysqld restart Stopping mysqld: Starting mysqld: [ [ OK OK ] ]

32 Change root password ~]# mysql mysql> UPDATE mysql.user SET password=password('newpass') WHERE user='root'; mysql> FLUSH PRIVILEGES; Remove skip-grant-tables from /etc/my.cnf

33 removed ib_logfile (DON T!) Free space was low: I deleted some log files... ~]# cd /var/lib/mysql mysql]# rm -rf ib_logfile* mysql]# lsof -n grep ib_logfile mysqld 1276 mysql 8uW REG 22, mysqld 1276 mysql 9uW REG 22, /var/lib/mysql/ib_logfile (deleted) 4355 /var/lib/mysql/ib_logfile1 (deleted)

34 removed ib_logfile (DON T!) mysqld and InnoDB continue working normally mysql> use test; mysql> create table tbl1 (id int auto_increment primary key, v varchar(1)) engine=innodb; mysql> insert into tbl1 values(null,'aa'); mysql> insert into tbl1 select null, v from tbl1; mysql> SELECT * FROM tbl1; ~]# service mysqld restart

35 removed ib_logfile (DON T!) InnoDB Redo Log are automatically recreated :42:2 InnoDB: Log file./ib_logfile did not exist: new to be created InnoDB: Setting log file./ib_logfile size to 32 MB InnoDB: Database physically writes the file full: wait :42:21 InnoDB: Log file./ib_logfile1 did not exist: new to be created InnoDB: Setting log file./ib_logfile1 size to 32 MB InnoDB: Database physically writes the file full: wait :42:22 InnoDB: highest supported file format is Barracuda. InnoDB: The log sequence number in ibdata files does not match InnoDB: the log sequence number in the ib_logfiles! :42:22 InnoDB: Database was not shut down normally! InnoDB: Starting crash recovery. InnoDB: Reading tablespace information from the.ibd files... InnoDB: Restoring possible half-written data pages from the doublewrite InnoDB: buffer...

36 removed ibdata1 (really, DON T!) Free space was low: I deleted a large file... mysql]# rm -f ibdata1 mysql]# lsof -n grep deleted mysqld 7478 mysql 3uW REG 22, (deleted) mysqld 7478 mysql 4u REG 22, (deleted) mysqld 7478 mysql 5u REG 22, (deleted) mysqld 7478 mysql 6u REG 22, (deleted) mysqld 7478 mysql 7u REG 22, (deleted) mysqld 7478 mysql 11u REG 22, (deleted) mysql]# lsof -n grep ibdata1 mysqld 7478 mysql 3uW REG 22, (deleted) /var/lib/mysql/ibdata1 /var/tmp/ibtkakep /var/tmp/ibf1ray /var/tmp/ib3piqic /var/tmp/ibl8k16o /var/tmp/ib7sjqkq /var/lib/mysql/ibdata1

37 removed ibdata1 (really, DON T!) mysqld and InnoDB continue working normally : mysql> insert into tbl1 values(null,'aa'); mysql> insert into tbl1 select null, v from tbl1; mysql> SELECT * FROM tbl1; until restart : ~]# service mysqld restart Stopping mysqld: [ OK ] MySQL Daemon failed to start. Starting mysqld: [FAILED]

38 removed ibdata1 (really, DON T!) You can now recover from backup!

39 removed ibdata1 (really, DON T!) InnoDB: The first specified data file./ibdata1 did not exist: InnoDB: a new database to be created! :48:28 InnoDB: Setting file./ibdata1 size to 18 MB InnoDB: Database physically writes the file full: wait :48:28 InnoDB: Error: all log files must be created at the same time :48:28 InnoDB: All log files must be created also in database creation :48:28 InnoDB: If you want bigger or smaller log files, shut down the :48:28 InnoDB: database and make sure there were no errors in shutdown :48:28 InnoDB: Then delete the existing log files. Edit the.cnf file :48:28 InnoDB: and start the database again :48:28 [ERROR] Plugin 'InnoDB' init function returned error :48:28 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed :48:28 [ERROR] Unknown/unsupported storage engine: InnoDB :48:28 [ERROR] Aborting Misleading errors

40 removed ibdata1 (really, DON T!) mysql]# rm -f ibdata1 ib_logfile* test/* ~]# service mysqld restart

41 MySQL server has gone away mysql> SELECT SLEEP(1); ERROR 213 (HY): Lost connection to MySQL server during query # kill -9 `pidof mysqld` # kill -6 `pidof mysqld` # kill -11 `pidof mysqld`

42 MySQL server has gone away Version: '5.5.34' socket: '/var/lib/mysql/mysql.sock' port: 336 MySQL Community Server (GPL) :6:1 mysqld_safe Number of processes running now: :6:1 mysqld_safe mysqld restarted

43 MySQL server has gone away OOM Killer crashing bug signals others Always check logs: - mysql error log - syslog

44 MySQL server has gone away ~]# ( echo -n "SELECT '" ; for i in `seq 1 1` ; do echo -n " " ; done ; echo -n "' a") mysql a ~]# ( echo -n "SELECT '" ; for i in `seq 1 2` ; do echo -n " " ; done ; echo -n "' a") mysql a ~]# ( echo -n "SELECT '" ; for i in `seq 1 1` ; do echo -n " " ; done ; echo -n "' a") mysql wc ~]# ( echo -n "SELECT '" ; for i in `seq 1 11` ; do echo -n " " ; done ; echo -n "' a") mysql wc ERROR 26 (HY) at line 1: MySQL server has gone away

45 MySQL server has gone away ~]# mysql -e "SHOW GLOBAL VARIABLES LIKE 'max_allowed_packet'" Variable_name Value max_allowed_packet ~]# mysql -e "SET GLOBAL max_allowed_packet=148576" ~]# ( echo -n "SELECT '" ; for i in `seq 1 11` ; do echo -n " " ; done ; echo -n "' a") mysql wc

46 MySQL server has gone away server crash server killed session terminated/killed session timing out (wait_timeout) big packet (max_allowed_packet)

47 MySQL BREAK/FIX LAB Replication Presented by: Alkin Tezuysal, Gillian Gunson, René Cannaò April 1, 214

48 Agenda - Part 2 Replication overview and tools Bad server-id slave id identical to master slave id identical to other slave Incorrect slave data Duplicate key error Data drift Relay log corruption

49 Replication Overview asynchronous: based on copying and executing of binary logs allows for delayed slaves, incremental backups binary logs have two formats statement: SQL row events: starting with 5.1 replication is run by two threads on slave IO thread: copies master binary logs to slave relay logs SQL thread: executes binlog events on data

50 Replication Processlist Threads Slave: slave1 [localhost] {msandbox} ((none)) > show processlist; Id User Host db Command Time State Info system user NULL Connect 31 Slave has read all relay log; waiting for the slave I/O thread to update it NULL 2 system user NULL Connect 31 Waiting for master to send event NULL 3 msandbox localhost NULL Query NULL show processlist rows in set (. sec)

51 Replication Processlist Threads Master: master [localhost] {msandbox} ((none)) > show processlist; Id User Host db Command Time State Info rsandbox localhost:4494 NULL Binlog Dump 147 Master has sent all binlog to slave; waiting for binlog to be updated NULL 2 rsandbox localhost:4495 NULL Binlog Dump 144 Master has sent all binlog to slave; waiting for binlog to be updated NULL 4 msandbox localhost NULL Query NULL show processlist rows in set (. sec)

52 Replication Tools MySQL Sandbox Percona Toolkit pt-table-checksum pt-table-sync pt-slave-restart mysqlbinlog error logs

53 Replication Tools (cont.) slave commands SHOW SLAVE STATUS\G STOP SLAVE; START SLAVE; STOP/START SLAVE IO_THREAD; STOP/START SLAVE SQL_THREAD; master commands SHOW MASTER STATUS; SHOW SLAVE HOSTS;

54 MySQL Sandbox created by Giuseppe Maxia (The Data Charmer) Linux/FreeBSD/MacOSX only not for production instances allows you to install and run multiple instances of MySQL on same server can easily set up replication groups default is master and two slaves can be run as regular (non-root) user

55 Replication Sandbox repl_test]$ pwd /home/user-lab/sandboxes/repl_test repl_test]$ ls check_slaves m clear_all master connection.json node1 default_connection.json node2 initialize_slaves README restart_all s1 s2 send_kill_all start_all status_all stop_all use_all repl_test]$./start_all # executing "start" on /home/user-lab/sandboxes/repl_test executing "start" on master... sandbox server started executing "start" on slave 1... sandbox server started executing "start" on slave 2... sandbox server started

56 Sandbox Master repl_test]$ cd master/ master]$ ls change_paths grants.mysql change_ports json_in_db clear load_grants connection.json msb data my default_connection.json my.sandbox.cnf proxy_start README rescue_mysql_dump.sql restart send_kill start master]$ ls data/ ibdata1 msandbox.err mysql-bin.index ib_logfile mysql mysql_sandbox23992.pid ib_logfile1 mysql-bin.1 performance_schema test status stop tmp use USING

57 Sandbox Slave master]$ cd../node1 change_paths change_ports clear connection.json data node1]$ ls default_connection.json grants.mysql json_in_db load_grants msb my my.sandbox.cnf proxy_start README restart node1]$ ls data ibdata1 mysql_sandbox23993.pid ib_logfile mysql_sandbox23993-relay-bin.1 ib_logfile1 mysql_sandbox23993-relay-bin.2 master.info mysql_sandbox23993-relay-bin.index msandbox.err performance_schema mysql relay-log.info mysql-bin.1 test mysql-bin.index send_kill start status stop tmp use USING

58 Connecting to MySQL Instances repl_test]$ ls check_slaves m clear_all master connection.json node1 default_connection.json node2 initialize_slaves README restart_all s1 s2 send_kill_all start_all status_all stop_all use_all repl_test]$./m Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 master [localhost] {msandbox} ((none)) > repl_test]$./s1 -uroot Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 slave1 [localhost] {root} ((none)) >

59 Problem #1: Duplicate server-id value the server-id uniquely identifies a server in a replication topology recorded in binary log dynamic variable (doesn t require restart) set in the my.cnf file (my.sandbox.cnf) if a server is cloned (e.g., ec2 snapshot), the server-id needs to be edited in new instance

60 Problem #1: Duplicate server-id value Example of slave with identical server_id to master: $./s1 -e "show slave status\g" *************************** 1. row *************************** Slave_IO_State: Slave_IO_Running: No Slave_SQL_Running: Yes Seconds_Behind_Master: NULL Master_SSL_Verify_Server_Cert: No Last_IO_Errno: 1593 Last_IO_Error: Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it). Master_Server_Id: 1

61 Problem #1: Duplicate server-id values with two slaves with identical server-ids, the symptoms and error messages are misleading master will show only one slave in processlist, continuously reconnecting

62 Problem #1: Duplicate server-id values slave status looks okay on both, but error logs will fill up: ~]$ cd sandboxes/ sandboxes]$ cd dupl_server_id2 dupl_server_id2]$./start_all dupl_server_id2]$ tail node1/data/msandbox.err :25:47 [Note] Slave: received end packet from server, apparent master shutdown: :25:47 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.3' at position :25:47 [Note] Slave: received end packet from server, apparent master shutdown: :25:47 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.3' at position 17

63 Solution #1: Modify slave server-id on one slave 1. set server_id variable dupl_server_id2]$./s1 slave1 [localhost] {msandbox} ((none)) > show global variables like 'server_id'; Variable_name Value server_id row in set (. sec) slave1 [localhost] {msandbox} ((none)) > set global server_id = 12; Query OK, rows affected (. sec) slave1 [localhost] {msandbox} ((none)) > stop slave; start slave; Query OK, rows affected (.2 sec) Query OK, rows affected (. sec) slave1 [localhost] {msandbox} ((none)) > show slave status\g

64 Solution #1: Modify slave server-id on one slave 2. edit node1/my.sandbox.cnf to use different server-id dupl_server_id2]$ cd node1 node1]$ sed -i 's/server-id=11/server-id=12/g' my.sandbox.cnf node1]$ grep server-id my.sandbox.cnf server-id=12

65 Problem #2: Duplicate key errors very common replication error number of possible causes slave created from bad backup slave replication started in wrong file/pos direct write to the slave data drift

66 Problem #2: Duplicate key errors Example sandboxes]$ cd dupl_key/ dupl_key]$./start_all # executing "start" on /home/user-lab/sandboxes/dupl_key executing "start" on master... sandbox server started executing "start" on slave 1... sandbox server started dupl_key]$./s1 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3

67 Problem #2: Duplicate key errors Example slave1 [localhost] {msandbox} (test) > show slave status\g *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: Master_User: rsandbox... Slave_IO_Running: Yes Slave_SQL_Running: No... Last_Errno: 162 Last_Error: Error 'Duplicate entry '3' for key 'PRIMARY'' on query. Default database: 'test'. Query: 'insert into dupe_test (val) values ('master3'), ('master4')'... Seconds_Behind_Master: NULL

68 Problem #2: Duplicate key errors Example (cont.) slave1 [localhost] {msandbox} ((none)) > use test; slave1 [localhost] {msandbox} (test) > show create table dupe_test\g *************************** 1. row *************************** Table: dupe_test Create Table: CREATE TABLE `dupe_test` ( `id` int(11) NOT NULL AUTO_INCREMENT, `val` varchar(2) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 1 row in set (. sec) slave1 [localhost] {msandbox} (test) > select * from dupe_test where id = 3; id val slave row in set (. sec)

69 Problem #2: Duplicate key errors Example (cont.) dupl_key]$ cd master master]$./my sqlbinlog data/mysql-bin.3... # at 521 #1441 7:5:14 server id 1 end_log_pos 589 Querythread_id=3 error_code= SET TIMESTAMP= /*!*/; BEGIN /*!*/; # at 589 #1441 7:5:14 server id 1 end_log_pos 617 Intvar SET INSERT_ID=3/*!*/; # at 617 #1441 7:5:14 server id 1 end_log_pos 739 Querythread_id=3 error_code= SET TIMESTAMP= /*!*/; insert into dupe_test (val) values ("master3"), ('master4') /*!*/;... exec_time= exec_time=

70 Solution #2: Duplicate key errors General solutions: 1. recreate slave from fresh backup of master (preferred) 2. get replication running again, fix data differences later We will be doing solution #2.

71 Solution #2: Duplicate key errors To check if the error is due to a direct write to slave: dupl_key]$ cd node1 node1]$ pwd /home/user-lab/sandboxes/dupl_key/node1 node1]$ ls data/mysql-bin.* data/mysql-bin.1 data/mysql-bin.2 data/mysql-bin.index node1]$./my sqlbinlog --server-id=11 data/mysql-bin. 2 grep dupe_test insert into dupe_test (val) values ('slave1')

DBA Tutorial Kai Voigt Senior MySQL Instructor Sun Microsystems kai@sun.com Santa Clara, April 12, 2010

DBA Tutorial Kai Voigt Senior MySQL Instructor Sun Microsystems kai@sun.com Santa Clara, April 12, 2010 DBA Tutorial Kai Voigt Senior MySQL Instructor Sun Microsystems kai@sun.com Santa Clara, April 12, 2010 Certification Details http://www.mysql.com/certification/ Registration at Conference Closed Book

More information

MySQL Backup and Recovery: Tools and Techniques. Presented by: René Cannaò @rene_cannao Senior Operational DBA www.palominodb.com

MySQL Backup and Recovery: Tools and Techniques. Presented by: René Cannaò @rene_cannao Senior Operational DBA www.palominodb.com MySQL Backup and Recovery: Tools and Techniques Presented by: René Cannaò @rene_cannao Senior Operational DBA www.palominodb.com EXPERIENCE WITH BACKUP How many of you consider yourself beginners? How

More information

Facultat d'informàtica de Barcelona Univ. Politècnica de Catalunya. Administració de Sistemes Operatius. System monitoring

Facultat d'informàtica de Barcelona Univ. Politècnica de Catalunya. Administració de Sistemes Operatius. System monitoring Facultat d'informàtica de Barcelona Univ. Politècnica de Catalunya Administració de Sistemes Operatius System monitoring Topics 1. Introduction to OS administration 2. Installation of the OS 3. Users management

More information

MySQL Backup Strategy @ IEDR

MySQL Backup Strategy @ IEDR MySQL Backup Strategy @ IEDR Marcelo Altmann Oracle Certified Professional, MySQL 5 Database Administrator Oracle Certified Professional, MySQL 5 Developer Percona Live London November 2014 Who am I? MySQL

More information

Database Administration with MySQL

Database Administration with MySQL Database Administration with MySQL Suitable For: Database administrators and system administrators who need to manage MySQL based services. Prerequisites: Practical knowledge of SQL Some knowledge of relational

More information

Monitoring MySQL. Geert Vanderkelen MySQL Senior Support Engineer Sun Microsystems

Monitoring MySQL. Geert Vanderkelen MySQL Senior Support Engineer Sun Microsystems Monitoring MySQL Geert Vanderkelen MySQL Senior Support Engineer Sun Microsystems Agenda Short intro into MySQL, the company Monitoring MySQL: some examples Nagios plugins for MySQL MySQL Enterprise Monitor

More information

Part 3. MySQL DBA I Exam

Part 3. MySQL DBA I Exam Part 3. MySQL DBA I Exam Table of Contents 23. MySQL Architecture... 3 24. Starting, Stopping, and Configuring MySQL... 6 25. Client Programs for DBA Work... 11 26. MySQL Administrator... 15 27. Character

More information

Monitoring MySQL. Kristian Köhntopp

Monitoring MySQL. Kristian Köhntopp Monitoring MySQL Kristian Köhntopp I am... Kristian Köhntopp Database architecture at a small travel agency in Amsterdam In previous lives: MySQL, web.de, NetUSE, MMC Kiel, PHP, PHPLIB, various FAQs and

More information

Monday, January 27, 14

Monday, January 27, 14 1 Copyright 2013, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 MySQL Server Performance Tuning 101 Ligaya Turmelle Principle Technical

More information

Practical MySQL Tuning

Practical MySQL Tuning Practical MySQL Tuning UKOUG Conference 2011 December 5 th, Birmingham Oli Sennhauser Senior MySQL Consultant, FromDual oli.sennhauser@fromdual.com www.fromdual.com 1 FromDual FromDual provides neutral

More information

Synchronous multi-master clusters with MySQL: an introduction to Galera

Synchronous multi-master clusters with MySQL: an introduction to Galera Synchronous multi-master clusters with : an introduction to Galera Henrik Ingo OUGF Harmony conference Aulanko, Please share and reuse this presentation licensed under Creative Commonse Attribution license

More information

Percona Server features for OpenStack and Trove Ops

Percona Server features for OpenStack and Trove Ops Percona Server features for OpenStack and Trove Ops George O. Lorch III Software Developer Percona Vipul Sabhaya Lead Software Engineer - HP Overview Discuss Percona Server features that will help operators

More information

High Availability And Disaster Recovery

High Availability And Disaster Recovery High Availability And Disaster Recovery Copyright 2011 Deepnet Security Limited Copyright 2012, Deepnet Security. All Rights Reserved. Page 1 Trademarks Deepnet Unified Authentication, MobileID, QuickID,

More information

Testing and Verifying your MySQL Backup Strategy

Testing and Verifying your MySQL Backup Strategy About the Author Ronald BRADFORD Testing and Verifying your MySQL Backup Strategy Ronald Bradford http://ronaldbradford.com @RonaldBradford 16 years with MySQL / 26 years with RDBMS Senior Consultant at

More information

How to evaluate which MySQL High Availability solution best suits you

How to evaluate which MySQL High Availability solution best suits you How to evaluate which MySQL High Availability solution best suits you Henrik Ingo Oscon, 2013 Please share and reuse this presentation licensed under the Creative Commons Attribution License http://creativecommons.org/licenses/by/3.0/

More information

Extreme Linux Performance Monitoring Part II

Extreme Linux Performance Monitoring Part II I. Introducing IO Monitoring Disk IO subsystems are the slowest part of any Linux system. This is due mainly to their distance from the CPU and the fact that disks require the physics to work (rotation

More information

5 Percona Toolkit tools that could save your day. Stéphane Combaudon FOSDEM February 3rd, 2013

5 Percona Toolkit tools that could save your day. Stéphane Combaudon FOSDEM February 3rd, 2013 5 Percona Toolkit tools that could save your day Stéphane Combaudon FOSDEM February 3rd, 2013 What is Percona Toolkit Set of cli tools to perform common tasks that are painful to do manually (~30 tools)

More information

MySQL Backup and Security. Best practices on how to run MySQL on Linux in a secure way Lenz Grimmer

MySQL Backup and Security. Best practices on how to run MySQL on Linux in a secure way Lenz Grimmer <lenz@mysql.com> MySQL Backup and Security Best practices on how to run MySQL on Linux in a secure way Lenz Grimmer Introduction In this session you will learn best practises on how to configure and run

More information

MySQL Backups: From strategy to Implementation

MySQL Backups: From strategy to Implementation MySQL Backups: From strategy to Implementation Mike Frank Senior Product Manager 1 Program Agenda Introduction The 5 Key Steps Advanced Options References 2 Backups are a DBAs Top Priority Be Prepared

More information

Preparing for the Big Oops! Disaster Recovery Sites for MySQL. Robert Hodges, CEO, Continuent MySQL Conference 2011

Preparing for the Big Oops! Disaster Recovery Sites for MySQL. Robert Hodges, CEO, Continuent MySQL Conference 2011 Preparing for the Big Oops! Disaster Recovery Sites for Robert Hodges, CEO, Continuent Conference 2011 Topics / Introductions / A Motivating Story / Master / Slave Disaster Recovery Replication Tungsten

More information

HP Open Source Middleware Stacks Blueprint:

HP Open Source Middleware Stacks Blueprint: HP Open Source Middleware Stacks Blueprint: Database Server on HP Server Platforms with MySQL and SUSE Linux Enterprise Server Version 10 HP Part Number: 5991 7432 Published: August 2007 Edition: 2.0 Copyright

More information

Parallel Replication for MySQL in 5 Minutes or Less

Parallel Replication for MySQL in 5 Minutes or Less Parallel Replication for MySQL in 5 Minutes or Less Featuring Tungsten Replicator Robert Hodges, CEO, Continuent About Continuent / Continuent is the leading provider of data replication and clustering

More information

Introduction to Using MySQL in Cloud Computing

<Insert Picture Here> Introduction to Using MySQL in Cloud Computing Introduction to Using MySQL in Cloud Computing Chuck Bell, Mats Kindahl, Lars Thalmann About the Speakers Chuck Bell, PhD Enterprise Backup and Replication (recovering) Windows Developer

More information

Neutron Monitor Database

Neutron Monitor Database Neutron Monitor Database ADRESKLOKSTRAAT 12 A - 2600 BERCHEMTEL03.230.88.10FAX03.303.02.59BTWBE 886.370.360MAILINFO@SPUTNIKWEB.BEWEBWWW.SPUTNIKWEB.BE Introduction In this document the work of Sputnik Web

More information

MySQL Replication Tutorial

MySQL Replication Tutorial MySQL Replication Tutorial Mats Kindahl Prerequisites In order to not clash with an existing installation, we will not do a proper install of the MySQL server but rather run it from a

More information

MySQL Enterprise Backup User's Guide (Version 3.5.4)

MySQL Enterprise Backup User's Guide (Version 3.5.4) MySQL Enterprise Backup User's Guide (Version 3.5.4) MySQL Enterprise Backup User's Guide (Version 3.5.4) Abstract This is the User's Guide for the MySQL Enterprise Backup product, the successor to the

More information

MySQL Enterprise Backup User's Guide (Version 3.5.4)

MySQL Enterprise Backup User's Guide (Version 3.5.4) MySQL Enterprise Backup User's Guide (Version 3.5.4) MySQL Enterprise Backup User's Guide (Version 3.5.4) Abstract This is the User's Guide for the MySQL Enterprise Backup product, the successor to the

More information

MySQL Enterprise Backup User's Guide (Version 3.9.0)

MySQL Enterprise Backup User's Guide (Version 3.9.0) MySQL Enterprise Backup User's Guide (Version 3.9.0) Abstract This is the User's Guide for the MySQL Enterprise Backup product. This manual describes the procedures to back up and restore MySQL databases.

More information

How to backup a remote MySQL server with ZRM over the Internet

How to backup a remote MySQL server with ZRM over the Internet How to backup a remote MySQL server with ZRM over the Internet White paper "As MySQL gains widespread adoption and moves more broadly into the enterprise, ZRM for MySQL addresses the growing need among

More information

Online Schema Changes for Maximizing Uptime. David Turner - Dropbox Ben Black - Tango

Online Schema Changes for Maximizing Uptime. David Turner - Dropbox Ben Black - Tango Online Schema Changes for Maximizing Uptime David Turner - Dropbox Ben Black - Tango About us Dropbox Tango Dropbox is a free service that lets you bring your photos, docs, and videos anywhere and share

More information

MySQL backup and restore best practices. Roman Vynar September 21, 2015

MySQL backup and restore best practices. Roman Vynar September 21, 2015 MySQL backup and restore best practices Roman Vynar September 21, 2015 Introduction This is a hands-on tutorial on setting up the different types of MySQL backups and recovering from various disasters.

More information

Using MySQL for Big Data Advantage Integrate for Insight Sastry Vedantam sastry.vedantam@oracle.com

Using MySQL for Big Data Advantage Integrate for Insight Sastry Vedantam sastry.vedantam@oracle.com Using MySQL for Big Data Advantage Integrate for Insight Sastry Vedantam sastry.vedantam@oracle.com Agenda The rise of Big Data & Hadoop MySQL in the Big Data Lifecycle MySQL Solutions for Big Data Q&A

More information

MySQL Administration and Management Essentials

MySQL Administration and Management Essentials MySQL Administration and Management Essentials Craig Sylvester MySQL Sales Consultant 1 Safe Harbor Statement The following is intended to outline our general product direction. It

More information

Dave Stokes MySQL Community Manager

Dave Stokes MySQL Community Manager The Proper Care and Feeding of a MySQL Server for Busy Linux Admins Dave Stokes MySQL Community Manager Email: David.Stokes@Oracle.com Twiter: @Stoker Slides: slideshare.net/davidmstokes Safe Harbor Agreement

More information

S W I S S O R A C L E U S E R G R O U P. N e w s l e t t e r 3 / 2 0 1 1 J u l i 2 0 1 1. with MySQL 5.5. Spotlight on the SQL Tuning

S W I S S O R A C L E U S E R G R O U P. N e w s l e t t e r 3 / 2 0 1 1 J u l i 2 0 1 1. with MySQL 5.5. Spotlight on the SQL Tuning S W I S S O R A C L E U S E R G R O U P www.soug.ch N e w s l e t t e r 3 / 2 0 1 1 J u l i 2 0 1 1 Safe backup and restore options with MySQL 5.5 Lizenzierung von virtuellen Datenbankumgebungen Oracle

More information

These sub-systems are all highly dependent on each other. Any one of them with high utilization can easily cause problems in the other.

These sub-systems are all highly dependent on each other. Any one of them with high utilization can easily cause problems in the other. Abstract: The purpose of this document is to describe how to monitor Linux operating systems for performance. This paper examines how to interpret common Linux performance tool output. After collecting

More information

IBM Redistribute Big SQL v4.x Storage Paths IBM. Redistribute Big SQL v4.x Storage Paths

IBM Redistribute Big SQL v4.x Storage Paths IBM. Redistribute Big SQL v4.x Storage Paths Redistribute Big SQL v4.x Storage Paths THE GOAL The Big SQL temporary tablespace is used during high volume queries to spill sorts or intermediate data to disk. To improve I/O performance for these queries,

More information

MySQL Cluster Deployment Best Practices

MySQL Cluster Deployment Best Practices MySQL Cluster Deployment Best Practices Johan ANDERSSON Joffrey MICHAÏE MySQL Cluster practice Manager MySQL Consultant The presentation is intended to outline our general product

More information

Lenz Grimmer

Lenz Grimmer <lenz@mysql.com> MySQL Backup and Security Best practices on how to run MySQL on Linux in a secure way Lenz Grimmer Free and Open Source Software Conference Bonn/Rhein-Sieg, Germany 24./25. June 2006 MySQL

More information

MySQL Enterprise Backup User's Guide (Version 3.10.2)

MySQL Enterprise Backup User's Guide (Version 3.10.2) MySQL Enterprise Backup User's Guide (Version 3.10.2) Abstract This is the User's Guide for the MySQL Enterprise Backup product. This manual describes the procedures to back up and restore MySQL databases.

More information

Linux System Administration on Red Hat

Linux System Administration on Red Hat Linux System Administration on Red Hat Kenneth Ingham September 29, 2009 1 Course overview This class is for people who are familiar with Linux or Unix systems as a user (i.e., they know file manipulation,

More information

20 Command Line Tools to Monitor Linux Performance

20 Command Line Tools to Monitor Linux Performance 20 Command Line Tools to Monitor Linux Performance 20 Command Line Tools to Monitor Linux Performance It s really very tough job for every System or Network administrator to monitor and debug Linux System

More information

High Availability Solutions for the MariaDB and MySQL Database

High Availability Solutions for the MariaDB and MySQL Database High Availability Solutions for the MariaDB and MySQL Database 1 Introduction This paper introduces recommendations and some of the solutions used to create an availability or high availability environment

More information

MySQL Replication. openark.org

MySQL Replication. openark.org MySQL Replication Solutions & Enhancements Shlomi Noach June 2011 What is MySQL Replication? Replication is a mechanism built into MySQL. It allows a MySQL server (Master) to log changes made to schema

More information

Databases and SQL. Homework. Matthias Danner. June 11, 2013. Matthias Danner Databases and SQL June 11, 2013 1 / 16

Databases and SQL. Homework. Matthias Danner. June 11, 2013. Matthias Danner Databases and SQL June 11, 2013 1 / 16 Databases and SQL Homework Matthias Danner June 11, 2013 Matthias Danner Databases and SQL June 11, 2013 1 / 16 Install and configure a MySQL server Installation of the mysql-server package apt-get install

More information

Installing and Configuring MySQL as StoreGrid Backend Database on Linux

Installing and Configuring MySQL as StoreGrid Backend Database on Linux Installing and Configuring MySQL as StoreGrid Backend Database on Linux Overview StoreGrid now supports MySQL as a backend database to store all the clients' backup metadata information. Unlike StoreGrid

More information

MySQL: Cloud vs Bare Metal, Performance and Reliability

MySQL: Cloud vs Bare Metal, Performance and Reliability MySQL: Cloud vs Bare Metal, Performance and Reliability Los Angeles MySQL Meetup Vladimir Fedorkov, March 31, 2014 Let s meet each other Performance geek All kinds MySQL and some Sphinx Working for Blackbird

More information

Tushar Joshi Turtle Networks Ltd

Tushar Joshi Turtle Networks Ltd MySQL Database for High Availability Web Applications Tushar Joshi Turtle Networks Ltd www.turtle.net Overview What is High Availability? Web/Network Architecture Applications MySQL Replication MySQL Clustering

More information

System Administration

System Administration Performance Monitoring For a server, it is crucial to monitor the health of the machine You need not only real time data collection and presentation but offline statistical analysis as well Characteristics

More information

MySQL Replication Best Practices. Francisco Bordenave MySQL Consultant May 13 th, 2015

MySQL Replication Best Practices. Francisco Bordenave MySQL Consultant May 13 th, 2015 MySQL Replication Best Practices Francisco Bordenave MySQL Consultant May 13 th, 2015 Agenda Replication in a nutshell. Setting up variables and replication. Monitoring replication. Checking data consistency.

More information

Workflow Templates Library

Workflow Templates Library Workflow s Library Table of Contents Intro... 2 Active Directory... 3 Application... 5 Cisco... 7 Database... 8 Excel Automation... 9 Files and Folders... 10 FTP Tasks... 13 Incident Management... 14 Security

More information

CIT 470: Advanced Network and System Administration. Topics. Performance Monitoring. Performance Monitoring

CIT 470: Advanced Network and System Administration. Topics. Performance Monitoring. Performance Monitoring CIT 470: Advanced Network and System Administration Performance Monitoring CIT 470: Advanced Network and System Administration Slide #1 Topics 1. Performance monitoring. 2. Performance tuning. 3. CPU 4.

More information

Setting up PostgreSQL

Setting up PostgreSQL Setting up PostgreSQL 1 Introduction to PostgreSQL PostgreSQL is an object-relational database management system based on POSTGRES, which was developed at the University of California at Berkeley. PostgreSQL

More information

Increasing XenServer s VM density

Increasing XenServer s VM density Increasing XenServer s VM density Jonathan Davies, XenServer System Performance Lead XenServer Engineering, Citrix Cambridge, UK 24 Oct 2013 Jonathan Davies (Citrix) Increasing XenServer s VM density 24

More information

SLURM Resources isolation through cgroups. Yiannis Georgiou email: yiannis.georgiou@bull.fr Matthieu Hautreux email: matthieu.hautreux@cea.

SLURM Resources isolation through cgroups. Yiannis Georgiou email: yiannis.georgiou@bull.fr Matthieu Hautreux email: matthieu.hautreux@cea. SLURM Resources isolation through cgroups Yiannis Georgiou email: yiannis.georgiou@bull.fr Matthieu Hautreux email: matthieu.hautreux@cea.fr Outline Introduction to cgroups Cgroups implementation upon

More information

InnoDB Data Recovery. Daniel Guzmán Burgos November 2014

InnoDB Data Recovery. Daniel Guzmán Burgos November 2014 InnoDB Data Recovery Daniel Guzmán Burgos November 2014 Agenda Quick review of InnoDB internals (B+Tree) Basics on InnoDB data recovery Data Recovery toolkit overview InnoDB Data Dictionary Recovering

More information

MySQL OLTP (Transactional) Load Testing

MySQL OLTP (Transactional) Load Testing MySQL OLTP (Transactional) Load Testing The document Introduction to Transactional (OLTP) Load Testing for all Databases provides a general overview on the HammerDB OLTP workload and should be read prior

More information

User Guide for VMware Adapter for SAP LVM VERSION 1.2

User Guide for VMware Adapter for SAP LVM VERSION 1.2 User Guide for VMware Adapter for SAP LVM VERSION 1.2 Table of Contents Introduction to VMware Adapter for SAP LVM... 3 Product Description... 3 Executive Summary... 3 Target Audience... 3 Prerequisites...

More information

StoreGrid Backup Server With MySQL As Backend Database:

StoreGrid Backup Server With MySQL As Backend Database: StoreGrid Backup Server With MySQL As Backend Database: Installing and Configuring MySQL on Windows Overview StoreGrid now supports MySQL as a backend database to store all the clients' backup metadata

More information

Zero Downtime Deployments with Database Migrations. Bob Feldbauer twitter: @bobfeldbauer email: bob.feldbauer@timgroup.com

Zero Downtime Deployments with Database Migrations. Bob Feldbauer twitter: @bobfeldbauer email: bob.feldbauer@timgroup.com Zero Downtime Deployments with Database Migrations Bob Feldbauer twitter: @bobfeldbauer email: bob.feldbauer@timgroup.com Deployments Two parts to deployment: Application code Database schema changes (migrations,

More information

Informatica Corporation Proactive Monitoring for PowerCenter Operations Version 3.0 Release Notes May 2014

Informatica Corporation Proactive Monitoring for PowerCenter Operations Version 3.0 Release Notes May 2014 Contents Informatica Corporation Proactive Monitoring for PowerCenter Operations Version 3.0 Release Notes May 2014 Copyright (c) 2012-2014 Informatica Corporation. All rights reserved. Installation...

More information

StoreGrid Backup Server With MySQL As Backend Database:

StoreGrid Backup Server With MySQL As Backend Database: StoreGrid Backup Server With MySQL As Backend Database: Installing and Configuring MySQL on Linux Overview StoreGrid now supports MySQL as a backend database to store all the clients' backup metadata information.

More information

MySQL Security for Security Audits

MySQL Security for Security Audits MySQL Security for Security Audits Presented by, MySQL AB & O Reilly Media, Inc. Brian Miezejewski MySQL Principal Consultat Bio Leed Architect ZFour database 1986 Senior Principal Architect American Airlines

More information

MySQL performance in a cloud. Mark Callaghan

MySQL performance in a cloud. Mark Callaghan MySQL performance in a cloud Mark Callaghan Special thanks Eric Hammond (http://www.anvilon.com) provided documentation that made all of my work much easier. What is this thing called a cloud? Deployment

More information

Maintaining Non-Stop Services with Multi Layer Monitoring

Maintaining Non-Stop Services with Multi Layer Monitoring Maintaining Non-Stop Services with Multi Layer Monitoring Lahav Savir System Architect and CEO of Emind Systems lahavs@emindsys.com www.emindsys.com The approach Non-stop applications can t leave on their

More information

Setting Up Specify to use a Shared Workstation as a Database Server

Setting Up Specify to use a Shared Workstation as a Database Server Specify Software Project www.specifysoftware.org Setting Up Specify to use a Shared Workstation as a Database Server This installation documentation is intended for workstations that include an installation

More information

Monitoreo de Bases de Datos

Monitoreo de Bases de Datos Monitoreo de Bases de Datos Monitoreo de Bases de Datos Las bases de datos son pieza fundamental de una Infraestructura, es de vital importancia su correcto monitoreo de métricas para efectos de lograr

More information

Welcome to Virtual Developer Day MySQL!

Welcome to Virtual Developer Day MySQL! Welcome to Virtual Developer Day MySQL! Keynote: Developer and DBA Guide to What s New in MySQL Andrew Morgan - MySQL Product Management @andrewmorgan www.clusterdb.com 1 Program Agenda 1:00 PM Keynote:

More information

Asterisk Cluster with MySQL Replication. JR Richardson Engineering for the Masses Hubguru@gmail.com

Asterisk Cluster with MySQL Replication. JR Richardson Engineering for the Masses Hubguru@gmail.com Asterisk Cluster with MySQL Replication JR Richardson Engineering for the Masses Hubguru@gmail.com Presentation Overview Reasons to cluster Asterisk Load distribution Scalability This presentation focuses

More information

Outline. Failure Types

Outline. Failure Types Outline Database Management and Tuning Johann Gamper Free University of Bozen-Bolzano Faculty of Computer Science IDSE Unit 11 1 2 Conclusion Acknowledgements: The slides are provided by Nikolaus Augsten

More information

OS Thread Monitoring for DB2 Server

OS Thread Monitoring for DB2 Server 1 OS Thread Monitoring for DB2 Server Minneapolis March 1st, 2011 Mathias Hoffmann ITGAIN GmbH mathias.hoffmann@itgain.de 2 Mathias Hoffmann Background Senior DB2 Consultant Product Manager for SPEEDGAIN

More information

GroundWork Monitor Open Source 5.1.0 Installation Guide

GroundWork Monitor Open Source 5.1.0 Installation Guide GroundWork Monitor Open Source 5.1 is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version

More information

How to Install SMTPSwith Mailer on Centos Server/VPS

How to Install SMTPSwith Mailer on Centos Server/VPS How to Install SMTPSwith Mailer on Centos Server/VPS SMTPSwitch Mailer User Guide V4.0 SMTPSwitch Mailer is a web based email marketing software that runs on a web server or online server. An online server

More information

RecoveryVault Express Client User Manual

RecoveryVault Express Client User Manual For Linux distributions Software version 4.1.7 Version 2.0 Disclaimer This document is compiled with the greatest possible care. However, errors might have been introduced caused by human mistakes or by

More information

MySQL Storage Engines

MySQL Storage Engines MySQL Storage Engines Data in MySQL is stored in files (or memory) using a variety of different techniques. Each of these techniques employs different storage mechanisms, indexing facilities, locking levels

More information

Using Tungsten Replicator to solve replication problems

Using Tungsten Replicator to solve replication problems Using Tungsten Replicator to solve replication problems Neil Armitage, Cluster implementation Engineer, Continuent Giuseppe Maxia, QA Director, Continuent 1 1 ABOUT US Neil Armitage Continuent Tungsten

More information

How to install/configure MySQL Database

How to install/configure MySQL Database How to install/configure MySQL Database Nurcan Ozturk Abstract: I explain how I installed MySQL database on my machine heppc6.uta.edu and the web-interfece of MySQL (phpmyadmin, running on heppc1.uta.edu).

More information

1. Product Information

1. Product Information ORIXCLOUD BACKUP CLIENT USER MANUAL LINUX 1. Product Information Product: Orixcloud Backup Client for Linux Version: 4.1.7 1.1 System Requirements Linux (RedHat, SuSE, Debian and Debian based systems such

More information

MySQL Update

<Insert Picture Here> MySQL Update MySQL Update Your name Your title Please Read The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated

More information

Online Backup Linux Client User Manual

Online Backup Linux Client User Manual Online Backup Linux Client User Manual Software version 4.0.x For Linux distributions August 2011 Version 1.0 Disclaimer This document is compiled with the greatest possible care. However, errors might

More information

Cisco Networking Academy Program Curriculum Scope & Sequence. Fundamentals of UNIX version 2.0 (July, 2002)

Cisco Networking Academy Program Curriculum Scope & Sequence. Fundamentals of UNIX version 2.0 (July, 2002) Cisco Networking Academy Program Curriculum Scope & Sequence Fundamentals of UNIX version 2.0 (July, 2002) Course Description: Fundamentals of UNIX teaches you how to use the UNIX operating system and

More information

Online Backup Client User Manual

Online Backup Client User Manual For Linux distributions Software version 4.1.7 Version 2.0 Disclaimer This document is compiled with the greatest possible care. However, errors might have been introduced caused by human mistakes or by

More information

Incremental Backup Script. Jason Healy, Director of Networks and Systems

Incremental Backup Script. Jason Healy, Director of Networks and Systems Incremental Backup Script Jason Healy, Director of Networks and Systems Last Updated Mar 18, 2008 2 Contents 1 Incremental Backup Script 5 1.1 Introduction.............................. 5 1.2 Design Issues.............................

More information

Percona XtraBackup Documentation. Percona Inc

Percona XtraBackup Documentation. Percona Inc Percona XtraBackup Documentation Percona Inc February 08, 2012 CONTENTS 1 Introduction 3 1.1 About Percona Xtrabackup........................................ 3 2 Installation 5 2.1 Installing XtraBackup

More information

Written by Administrator Saturday, 11 October :20 - Last Updated Saturday, 29 November :21

Written by Administrator Saturday, 11 October :20 - Last Updated Saturday, 29 November :21 Introduction This article an introduction to MySQL Replication. It is not intended as an advanced replication solution for enterprises but will be targeted at the users who want a quick step by step on

More information

Detecting (and even preventing) SQL Injection Using the Percona Toolkit and Noinject!

Detecting (and even preventing) SQL Injection Using the Percona Toolkit and Noinject! Detecting (and even preventing) SQL Injection Using the Percona Toolkit and Noinject! Justin Swanhart Percona Live, April 2013 INTRODUCTION 2 Introduction 3 Who am I? What do I do? Why am I here? The tools

More information

Best Practices for Deploying & Tuning Oracle Database 12c on RHEL6

Best Practices for Deploying & Tuning Oracle Database 12c on RHEL6 Best Practices for Deploying & Tuning Oracle Database 12c on RHEL6 Roger Lopez, Principal Software Engineer, Red Hat Sanjay Rao, Principal Performance Engineer, Red Hat April, 2014 Agenda Agenda Deploying

More information

Do it Yourself System Administration

Do it Yourself System Administration Do it Yourself System Administration Due to a heavy call volume, we are unable to answer your call at this time. Please remain on the line as calls will be answered in the order they were received. We

More information

MySQL always-up with Galera Cluster

MySQL always-up with Galera Cluster MySQL always-up with Galera Cluster SLAC 2014 May 14, 2014, Berlin by oli.sennhauser@fromdual.com 1 / 31 About FromDual GmbH FromDual provides neutral and independent: Consulting for MySQL, Galera Cluster,

More information

Monetizing Millions of Mobile Users with Cloud Business Analytics

Monetizing Millions of Mobile Users with Cloud Business Analytics Monetizing Millions of Mobile Users with Cloud Business Analytics MicroStrategy World 2013 David Abercrombie Data Analytics Engineer Agenda Tapjoy Big Data Architecture MicroStrategy Cloud Implementation

More information

Online Backup Client User Manual Linux

Online Backup Client User Manual Linux Online Backup Client User Manual Linux 1. Product Information Product: Online Backup Client for Linux Version: 4.1.7 1.1 System Requirements Operating System Linux (RedHat, SuSE, Debian and Debian based

More information

Easy Setup Guide 1&1 CLOUD SERVER. Creating Backups. for Linux

Easy Setup Guide 1&1 CLOUD SERVER. Creating Backups. for Linux Easy Setup Guide 1&1 CLOUD SERVER Creating Backups for Linux Legal notice 1&1 Internet Inc. 701 Lee Road, Suite 300 Chesterbrook, PA 19087 USA www.1and1.com info@1and1.com August 2015 Copyright 2015 1&1

More information

MySQL Cluster 7.0 - New Features. Johan Andersson MySQL Cluster Consulting johan.andersson@sun.com

MySQL Cluster 7.0 - New Features. Johan Andersson MySQL Cluster Consulting johan.andersson@sun.com MySQL Cluster 7.0 - New Features Johan Andersson MySQL Cluster Consulting johan.andersson@sun.com Mat Keep MySQL Cluster Product Management matthew.keep@sun.com Copyright 2009 MySQL Sun Microsystems. The

More information

Storage Performance Testing

Storage Performance Testing Storage Performance Testing Woody Hutsell, Texas Memory Systems SNIA Legal Notice The material contained in this tutorial is copyrighted by the SNIA. Member companies and individuals may use this material

More information

Deploying MySQL with the Oracle ZFS Storage Appliance

Deploying MySQL with the Oracle ZFS Storage Appliance Deploying MySQL with the Oracle ZFS Storage Appliance Paul Johnson Principal Software Engineer Robert Cummins Principal Software Engineer John Zabriskie Software Engineer John Baton Software Engineer Table

More information

XtraBackup: Hot Backups and More

XtraBackup: Hot Backups and More XtraBackup: Hot Backups and More Vadim Tkachenko Morgan Tocker http://percona.com http://mysqlperformanceblog.com MySQL CE Apr 2010 -2- Introduction Vadim Tkachenko Percona Inc, CTO and Lead of Development

More information

System Resources. To keep your system in optimum shape, you need to be CHAPTER 16. System-Monitoring Tools IN THIS CHAPTER. Console-Based Monitoring

System Resources. To keep your system in optimum shape, you need to be CHAPTER 16. System-Monitoring Tools IN THIS CHAPTER. Console-Based Monitoring CHAPTER 16 IN THIS CHAPTER. System-Monitoring Tools. Reference System-Monitoring Tools To keep your system in optimum shape, you need to be able to monitor it closely. Such monitoring is imperative in

More information

Partek Flow Installation Guide

Partek Flow Installation Guide Partek Flow Installation Guide Partek Flow is a web based application for genomic data analysis and visualization, which can be installed on a desktop computer, compute cluster or cloud. Users can access

More information