Skip to content

Instantly share code, notes, and snippets.

@ayberkcal
ayberkcal / mysql-faster-imports.sh
Created November 29, 2020 02:19 — forked from OZZlE/mysql-faster-imports.sh
Linux Bash Script to toggle faster mysql db imports
#!/usr/bin/env bash
# USAGE: mysqlOptimizeForImports <- before importing
# mysqlDefaultSettings <- to go back to normal
# Based on https://dba.stackexchange.com/questions/83125/mysql-any-way-to-import-a-huge-32-gb-sql-dump-faster/83385#83385
mysqlStateFile="$HOME/mysql.optimized.for.exports"
mysqlConfigLocation="/etc/mysql/my.cnf" # <-- change to the correct for your system, should be for global mysql settings

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
/*
* source: https://github.com/onurdegerli/job-titles
*/
CREATE TABLE IF NOT EXISTS `job_title` (
`job_title_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`parent_job_title_id` int(10) unsigned NOT NULL DEFAULT '0',
`title_en` varchar(255) NOT NULL,
`title_tr` varchar(255) NOT NULL,
`url` varchar(255) NOT NULL,
PRIMARY KEY (`job_title_id`)
This file has been truncated, but you can view the full file.
/*
Türkiye'nin il, ilçe , semt, mahalle, posta kodu veritabanı
GÜNCEL : 19.04.2013
Kaynak : PTT
Oluşturan : http://www.twitter.com/tserpico
*/
DROP TABLE IF EXISTS `pk`;
CREATE TABLE `pk` (
`mahalle_id` bigint(10) NOT NULL AUTO_INCREMENT,
Aad M
Aadam M
Aaden M
Aadje F
Aadu M
Aaf ?F
Aafke ?
Aafkea F
Aafko M
Aage M
[
{
"city": "Oranjestad",
"code": "AW"
},
{
"city": "Kabul",
"code": "AF"
},
{
-- MySQL dump 10.13 Distrib 5.1.51, for pc-linux-gnu (i686)
--
-- Host: 127.0.0.1 Database: world
-- ------------------------------------------------------
-- Server version 5.1.51-debug-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
-- Turkce isimler sozlugu twitter : http://twitter.com/tserpico
CREATE TABLE `isimler` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`isimler` varchar(255) DEFAULT NULL,
`cinsiyet` varchar(255) DEFAULT NULL COMMENT 'erkek : E , kadın : K , uniseks : U',
PRIMARY KEY (`id`)
) ENGINE=InnoDB;
-- ----------------------------