Mysql ubuntu
# stop service
sudo service mysql stop
# conf file
/etc/mysql/my.cnf
# chenge ownership of a folder
chown -R mysql:mysql /array2/mysql
# app armor alias:
/etc/apparmor.d/tunables/alias
echo "alias /var/lib/mysql/ -> /var/lib/virtuoso-opensource-6.1/mysqldb/mysql_data/," >> /etc/apparmor.d/tunables/alias
# appArmor mysql user
/etc/apparmor.d/usr.sbin.mysqld
http://www.prodevtips.com/2012/05/24/moving-the-mysql-database-directory-to-different-drive-on-ubuntu/
#tune database for insert
http://derwiki.tumblr.com/post/24490758395/loading-half-a-billion-rows-into-mysql