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
# Install this node.js starter app | |
# https://github.com/sahat/hackathon-starter | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
sudo apt-get install build-essential -y | |
#https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/ | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 | |
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list |
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
# See https://github.com/datacharmer/mysql-docker-minimal | |
docker rm my_bin mybox | |
docker create --name my_bin -v /opt/mysql datacharmer/mysql-minimal-8.0 | |
docker run -ti --volumes-from my_bin --name mybox datacharmer/my-ubuntu bash |
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 IS_UUID(1); | |
SET @uuid='aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee'; | |
SELECT IS_UUID(@uuid) AS is_uuid; | |
SELECT IS_UUID(REPLACE(@uuid,'-','')) AS is_uuid; | |
SELECT @uuid_bin := UUID_TO_BIN(@uuid) AS uuid_bin, LENGTH(@uuid_bin) AS len; | |
SELECT @old_uuid_bin := UNHEX(REPLACE(@uuid,'-','')) AS old_uuid_bin, LENGTH(@old_uuid_bin) AS len; | |
SELECT @uuid_bin = @old_uuid_bin; | |
SELECT BIN_TO_UUID(@uuid_bin) AS uuid, HEX(@old_uuid_bin) AS uuid_old; |
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
UPDATE performance_schema.setup_consumers | |
SET enabled='YES' | |
WHERE name='events_statements_history_long'; |
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 EVENT_ID, | |
TRUNCATE(TIMER_WAIT/1000000000000,6) AS duration, | |
current_schema, sql_text | |
FROM performance_schema.events_statements_history_long | |
WHERE sql_text IS NOT NULL | |
AND current_schema != 'performance_schema' | |
ORDER BY duration DESC | |
LIMIT 10; |
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
# This snippet performs the following for RedHat/CentOS/OL 6.x system | |
# | |
# - Clean Installation of Percona Server 5.6.26 | |
# - Clean Installation of TokuDB for said version (e.g. if already exists on server) | |
# - Configuration and verification of TokuDB | |
# | |
# NOTE: Installing via yum is not permitted | |
# To simulate a base system run: | |
# vagrant init centos/6; 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
MYSQL_ROOT_PASSWD=$(date | md5sum | cut -c1-20)"#"; echo ${MYSQL_ROOT_PASSWD} | |
docker run --name mysql-qldb-migration -e MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWD} -d mysql/mysql-server:latest | |
docker logs mysql-qldb-migration | |
docker exec -i mysql-qldb-migration mysql -uroot -p${MYSQL_ROOT_PASSWD} < schema.sql | |
docker exec -i mysql-qldb-migration mysql -uroot -p${MYSQL_ROOT_PASSWD} demo < qldb-members-example.sql | |
docker exec -it mysql-qldb-migration mysql -uroot -p${MYSQL_ROOT_PASSWD} demo | |
docker exec -i mysql-qldb-migration mysql -uroot -p${MYSQL_ROOT_PASSWD} < migration-user.sql | |
docker exec -it mysql-qldb-migration /bin/bash |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer