dnf install openssl
curl -sL https://talos.dev/install | sh
https://www.liquidmetal.dev/docs/tutorial-basics/network#create-the-network-and-bridge
Define the bridge name:
#!/bin/bash | |
wget https://github.com/rocky-linux/kickstarts/raw/r9/Rocky-9-Vagrant-Libvirt.ks | |
patch <<EOF | |
--- Rocky-9-Vagrant-Libvirt.ks.orig 2024-07-30 22:35:00.629119036 +0300 | |
+++ Rocky-9-Vagrant-Libvirt.ks 2024-07-30 22:35:52.690757566 +0300 | |
@@ -22,7 +22,7 @@ | |
skipx | |
# System services | |
-services --enabled="vmtoolsd" |
dnf install openssl
curl -sL https://talos.dev/install | sh
https://www.liquidmetal.dev/docs/tutorial-basics/network#create-the-network-and-bridge
Define the bridge name:
apiVersion: batch/v1 | |
kind: CronJob | |
metadata: | |
name: cluster1-pgdump-backup | |
spec: | |
schedule: "11 * * * *" | |
jobTemplate: | |
spec: | |
template: | |
spec: |
kubectl run kaniko --rm -i --restart=Never \ | |
--image=gcr.io/kaniko-project/executor:latest \ | |
--env="DOCKER_USERNAME=$DOCKER_USERNAME" \ | |
--env="DOCKER_PASSWORD=$DOCKER_PASSWORD" \ | |
--env="DOCKER_REGISTRY=docker.io" \ | |
--command -- /bin/bash <<EOF | |
/kaniko/executor \ | |
--context=dir:///build \ | |
--dockerfile=/dev/stdin \ | |
--destination=docker.io/$DOCKER_USERNAME/k8spodcreator:1.0 \ |
## Create a table and fill it with first checksum: | |
# create table percona.users_crc(id int primary key, crc varchar(10)); | |
# replace into percona.users_crc SELECT 1,CONV(BIT_XOR(CAST(CRC32(concat(user,host,`plugin`,authentication_string)) AS UNSIGNED)), 10, 16) from mysql.user; | |
*/5 * * * * root test $(mysql --host pxc-name-or-ip --user root -psecret -Ne 'select crc into @old_crc from percona.users_crc LIMIT 1;replace into percona.users_crc SELECT 1,CONV(BIT_XOR(CAST(CRC32(concat(user,host,`plugin`,authentication_string)) AS UNSIGNED)), 10, 16) from mysql.user; select count(*) from percona.users_crc where crc <> @old_crc') -gt 0 && /usr/bin/proxysql-admin --syncusers |
set @bkpdir := '/home/root/backup'; | |
set @dtdir := '/var/lib/mysql'; | |
set @usr := 'mysql:mysql'; | |
-- !@#$%^&*()-=+_.,;:"'\/ | |
DROP FUNCTION IF EXISTS TBL_TO_MYSQL_FILENAME; | |
CREATE FUNCTION TBL_TO_MYSQL_FILENAME(s TEXT) RETURNS TEXT DETERMINISTIC | |
RETURN | |
REPLACE( | |
REPLACE( |
https://github.com/percona/percona-server.git 70148a7d330919102bf4579380aedca4df9fdbfa | |
Test case: | |
1. setup | |
create database test; | |
use test | |
create table t (c int auto_increment primary key, c1 varchar(255)); | |
insert into t (c) values (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL); | |
insert into t (c) values (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL); | |
insert into t (c) select NULL from t t1, t t2, t t3, t t4, t t5; |
#!/usr/bin/env perl | |
# Usage | |
# 1. Save show status output in a file, e.g. run inside mysql cli: | |
# mysql> tee report.txt | |
# mysql> SHOW STATUS;select sleep(1);SHOW STATUS;select sleep(1);SHOW STATUS;select sleep(1);SHOW STATUS;select sleep(1);SHOW STATUS;select sleep(1); | |
# mysql> notee | |
# 2. perl mysqlcli2mext.pl < report.txt | |
# 3. pt-mext -r -- cat report.txt | |
$print_next=0; | |
$prev_line=''; |
# get only queries from processlist and apply count(*) group by query | |
prlist_lines.sh 2017_08_31_00_14_51-processlist |sed -e 's/^.*Info://' | sort |uniq -c |sort -n |
#!/bin/bash -e | |
# git clone https://github.com/mysql/mysql-server | |
# cd mysql-server; git checkout 8.0 | |
# ../build-mysql.sh 8.0 rel | |
REPO=$PWD | |
VER=$1 | |
DESC=`git log -1 --pretty=%B|xargs` | |
if [ "x${VER}" = "x" ] ; then | |
VER=56 |