April 9, 2014
apt-get update && apt-get install libssl1.0.0 openssl && service nginx restart

April 5, 2014
ServicePointManager.ServerCertificateValidationCallback = (sender, cert, chain, ssl) => true;

April 2, 2014
This script asumes that you have created a snapshot in the master server with Percona innobackupex.
#!/bin/bash
 
master=$1.xxxxxxx.com
PORT=22
 
if [ "$#" -ne 1 ]; then
    echo Usage  instreplication.sh server
    echo ex: s6 r6
    exit 0
fi
 
service mysql stop
 
set -e
 
rsync -avprP --delete -e "ssh -p$PORT" $master:/var/sqlbackup/ /var/lib/mysql/
chown -R mysql:mysql /var/lib/mysql
service mysql start
 
# obtener la IP del slave
IP=$(ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p')
 
# dar permisos al slave en master
ssh -f root@$master -p $PORT "mysql -e \"GRANT REPLICATION SLAVE ON *.* TO 'xxxxx'@'$IP' IDENTIFIED BY 'xxxxx';flush privileges;\" > /dev/null 2>&1"
 
# Update the server id.
sed 's/^server-id=1/server-id=2/g' -i /etc/mysql/my.cnf
 
# IP del master
masterIP=$(dig +short $master)
 
logfile=$(awk '/bin/{ print $1 }' /var/lib/mysql/xtrabackup_binlog_pos_innodb)
logfile=${logfile/.\//} # sometimes the format is ./xx and we only need the file name
logfile=${logfile/\/var\/log\/mysql\//} # also it can be the full path.
 
logpos=$(awk '/bin/{ print $2 }' /var/lib/mysql/xtrabackup_binlog_pos_innodb)
 
mysql -e "stop slave; reset slave"
mysql -e "CHANGE MASTER TO MASTER_HOST='$masterIP', MASTER_PORT=3307, MASTER_USER='xxxxx', MASTER_PASSWORD='xxxxx', MASTER_LOG_FILE='$logfile', MASTER_LOG_POS=$logpos;"
mysql -e "start slave; show slave status\G"

April 2, 2014
service mysql stop
mysqld_safe --skip-grant-tables &
mysql -u root
update mysql.user set password=PASSWORD("xxxxx") where User='root'; flush privileges; quit;
mysqladmin shutdown
service mysql start

March 31, 2014
SELECT table_name, format(TABLE_ROWS, 0, 'es-ES') 
FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'xxxx' 
ORDER BY TABLE_ROWS;