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
#!/usr/bin/python3.8 | |
import mysqlx | |
import sys | |
from random import choice, randrange | |
from faker import Faker | |
def connect(): | |
session = mysqlx.get_session( |
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
use sys; | |
DROP VIEW IF EXISTS replication_status_full; | |
CREATE | |
ALGORITHM = MERGE | |
SQL SECURITY INVOKER | |
VIEW replication_status_full | |
AS | |
SELECT | |
concat(s.channel_name, ' (', w.worker_id,')') AS channel, | |
c.host, |
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
SELECT schema_name, format_pico_time(total_latency) tot_lat, | |
exec_count, format_pico_time(total_latency/exec_count) latency_per_call, | |
query_sample_text | |
FROM sys.x$statements_with_runtimes_in_95th_percentile AS t1 | |
JOIN performance_schema.events_statements_summary_by_digest AS t2 | |
ON t2.digest=t1.digest | |
WHERE schema_name NOT in ('performance_schema', 'sys') | |
ORDER BY (total_latency/exec_count) desc LIMIT 1\G |
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
import io | |
import json | |
import logging | |
import oci | |
import base64 | |
from mysql.connector import connection | |
from datetime import datetime | |
from fdk import response |
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
[Unit] | |
Description=Streaming MySQL binary logs to local filesystem using %i | |
After=network.target | |
[Service] | |
Type=simple | |
User=root | |
Restart=on-failure | |
ExecStart=/root/binlog_streaming/bin/binlog_to_local.sh /root/binlog_streaming/conf/%i.conf |
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
CREATE TABLE t_win(x int AUTO_INCREMENT PRIMARY KEY); | |
INSERT INTO t_win | |
VALUES (1), | |
(2), | |
(3), | |
(4), | |
(5), | |
(6), |
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
create database mds; | |
SET GLOBAL log_bin_trust_function_creators = 1; | |
USE mds; | |
DROP FUNCTION IF EXISTS get_gtid_to_skip; | |
DELIMITER | | |
CREATE FUNCTION get_gtid_to_skip() | |
RETURNS LONGTEXT | |
BEGIN |
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
#!/bin/bash | |
if [ $# -eq 0 ] | |
then | |
echo "A configuration file is required" | |
exit 1 | |
fi | |
CONF_FILE=$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
#!/bin/bash | |
if [ $# -eq 0 ] | |
then | |
echo "A configuration file is required" | |
exit 1 | |
fi | |
CONF_FILE=$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
<html> | |
<header> | |
<title>PHP on OCI with MySQL Database Service</title> | |
</header> | |
<body> | |
<center><h1>PHP on OCI with MySQL Database Service</h1></center> | |
<hr> | |
<?php | |
$user = ""; | |
$pwd = ""; |
NewerOlder