This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ISSUE="199402" | |
VM_NAME_PREFIX=$ISSUE"_marcelo_altmann_pxc" | |
for i in {1..3}; | |
do | |
{ | |
VM_NAME=$VM_NAME_PREFIX"_node_"$i; | |
lxc-stop -n $VM_NAME; | |
lxc-destroy -n $VM_NAME; | |
lxc-create -t centos -n $VM_NAME; | |
lxc-start -n $VM_NAME; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# RHEL 7.5 | |
vagrant init --box-version "1.6.26" generic/rhel7; vagrant up --provider virtualbox; | |
# RHEL 7.3 | |
vagrant init --box-version '1.0.4' generic/rhel7; vagrant up --provider virtualbox; | |
# Centos 7.2 | |
vagrant init --box-version '1603.01' centos/7; vagrant up --provider virtualbox; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
date_default_timezone_set('UTC'); | |
$mysqli = new mysqli('127.0.0.1', 'root', 'sekret', 'test', 6033); | |
if ($mysqli->connect_error) { | |
die('Connect Error (' . $mysqli->connect_errno . ') ' | |
. $mysqli->connect_error); | |
} | |
/* Setup */ | |
echo date('Y-m-d H:i:s') . " Starting to SETUP the test\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mysqld] | |
datadir=/var/lib/mysql | |
socket=/var/lib/mysql/mysql.sock | |
# Disabling symbolic-links is recommended to prevent assorted security risks | |
symbolic-links=0 | |
log-error=/var/log/mysqld.log | |
pid-file=/var/run/mysqld/mysqld.pid | |
log-bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mysqld] | |
datadir=/var/lib/mysql | |
socket=/var/lib/mysql/mysql.sock | |
# Disabling symbolic-links is recommended to prevent assorted security risks | |
symbolic-links=0 | |
log-error=/var/log/mysqld.log | |
pid-file=/var/run/mysqld/mysqld.pid | |
log-bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
............ DUMPING MAIN DATABASE ............ | |
***** DUMPING global_variables ***** | |
+-----------------------------------------------------+--------------------+ | |
| variable_name | variable_value | | |
+-----------------------------------------------------+--------------------+ | |
| mysql-shun_on_failures | 5 | | |
| mysql-shun_recovery_time_sec | 10 | | |
| mysql-query_retries_on_failure | 1 | | |
| mysql-client_multi_statements | true | | |
| mysql-connect_retries_delay | 1 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO `languages` (`locales`, `name`) VALUES ('en_US', 'English'), | |
('ab', 'Abkhaz'), | |
('ab', 'Abkhaz'), | |
('ab', 'Abkhaz'), | |
('ab', 'Abkhaz'), | |
('ab', 'Abkhaz'), | |
('ab', 'Abkhaz'), | |
('ab', 'Abkhaz'), | |
('ab', 'Abkhaz'), | |
('ab', 'Abkhaz'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2020-05-20 15:55:34 [INFO] ProxySQL version 2.0.12-38-g58a909a | |
2020-05-20 15:55:34 [INFO] Detected OS: Linux marcelo-2711-proxysql-1 5.4.0-28-generic #32-Ubuntu SMP Wed Apr 22 17:40:10 UTC 2020 x86_64 | |
2020-05-20 15:55:34 [INFO] ProxySQL SHA1 checksum: 46f8b8fb1e79484931cdaedb6c200dea3e5c0dea | |
2020-05-20 15:55:34 [INFO] Starting ProxySQL | |
2020-05-20 15:55:34 [INFO] Sucessfully started | |
2020-05-20 15:55:34 [INFO] Angel process started ProxySQL process 734330 | |
Standard ProxySQL MySQL Logger rev. 2.0.0714 -- MySQL_Logger.cpp -- Sun May 17 20:24:24 2020 | |
Standard ProxySQL Cluster rev. 0.4.0906 -- ProxySQL_Cluster.cpp -- Sun May 17 20:24:24 2020 | |
Standard ProxySQL Statistics rev. 1.4.1027 -- ProxySQL_Statistics.cpp -- Sun May 17 20:24:24 2020 | |
Standard ProxySQL HTTP Server Handler rev. 1.4.1031 -- ProxySQL_HTTP_Server.cpp -- Sun May 17 20:24:24 2020 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Many of these are obvious and stupidly simple, but for your reference and copy-pasting pleasure… | |
# Mextify all (with workaround for pesky samples that contain multi-line RSA key that breaks pt-mext) | |
for i in $(ls $1/*-mysqladmin); do { (cat $i | sed -e '/\-\-\-\-\-BEGIN\ PUBLIC\ KEY/,+9d' | pt-mext -r -- cat -) > $i.mext && echo $i.mext;} done; | |
# Inspect given variable through multiple mext samples (revealing ;-)) | |
grep Table_locks_waited *.mext |less -S | |
#Find contentious tables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start_server | |
backup_dir=$topdir/xb_export_backup | |
rm -rf $backup_dir | |
mkdir $backup_dir | |
mysql -e 'CREATE TABLE test1(a int, b int, PRIMARY KEY (a), KEY (b DESC))' test | |
mysql -e 'CREATE TABLE test2(a int, b int, PRIMARY KEY (a), KEY (b ASC))' test | |
mysql -e "INSERT INTO test1 VALUES(1,2)" test |
OlderNewer