Quantcast
Channel: s9s
Viewing all articles
Browse latest Browse all 8

Parallel load a mysqldump

$
0
0

pload.sh

#!/usr/bin/env bash

[[ $# -ne 6 ]] && echo "$(basename $0) <dumpfile> <# of splits/chunks. max 20> <# of mysql clients> <db user> <db password> <db schema>"&& exit 1
user=$4
password=$5
schema=$6

#add multiple hosts if available
declare -a hosts=('127.0.0.1''127.0.0.1')
MYSQL_CMD=mysql

dumpfile=$1
splits=$2
clients=$3

declare -a splitfiles=('xaa''xab''xac''xad''xae''xaf''xag''xah''xai''xaj''xak''xal''xam''xan''xao''xap''xaq''xar''xas''xat')

# split file

Tags: 


Viewing all articles
Browse latest Browse all 8

Trending Articles