Skip to content

Instantly share code, notes, and snippets.

@TheFox
Last active June 19, 2016 15:01
Show Gist options
  • Save TheFox/b16c3ff0b3cad6e91899 to your computer and use it in GitHub Desktop.
Save TheFox/b16c3ff0b3cad6e91899 to your computer and use it in GitHub Desktop.
Install MariaDB and TokuDB.
#!/usr/bin/env bash
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
aptitude update
aptitude install mariadb-server
/etc/init.d/mysql stop
cp /etc/mysql/my.cnf /etc/mysql/my.cnf_ORG
# Change to bind-address = 0.0.0.0
# Change to basedir = /opt/mysql
vi /etc/mysql/my.cnf
cd /opt
tar -vxzf mariadb-5.5.30-tokudb-7.0.1-linux-x86_64.tar.gz
ln -s mariadb-5.5.30-tokudb-7.0.1-linux-x86_64 mysql
cd mysql
chown -R mysql:mysql .
scripts/mysql_install_db --user=mysql --defaults-file=/etc/mysql/my.cnf
mv /etc/init.d/mysql /etc/init.d/mysql_ORG
mv /usr/bin/mysql /usr/bin/mysql_ORG
mv /usr/bin/mysqladmin /usr/bin/mysqladmin_ORG
mv /usr/bin/mysqldump /usr/bin/mysqldump_ORG
ln -s ../../opt/mysql/support-files/mysql.server /etc/init.d/mysql
ln -s ../../opt/mysql/bin/mysql /usr/bin/mysql
ln -s ../../opt/mysql/bin/mysqladmin /usr/bin/mysqladmin
ln -s ../../opt/mysql/bin/mysqldump /usr/bin/mysqldump
/etc/init.d/mysql start
echo 'show plugins;' | mysql -u root -pYOUR_ROOT_PASSWORD
mv /etc/init.d/mysql /etc/init.d/mysql_ORG
mv /usr/bin/mysql /usr/bin/mysql_ORG
mv /usr/bin/mysqladmin /usr/bin/mysqladmin_ORG
mv /usr/bin/mysqldump /usr/bin/mysqldump_ORG
ln -s ../../opt/mysql/support-files/mysql.server /etc/init.d/mysql
ln -s ../../opt/mysql/bin/mysql /usr/bin/mysql
ln -s ../../opt/mysql/bin/mysqladmin /usr/bin/mysqladmin
ln -s ../../opt/mysql/bin/mysqldump /usr/bin/mysqldump
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
aptitude update
aptitude install mariadb-server
/etc/init.d/mysql stop
cd /opt
tar -vxzf mariadb-5.5.30-tokudb-7.0.1-linux-x86_64.tar.gz
ln -s mariadb-5.5.30-tokudb-7.0.1-linux-x86_64 mysql
cd mysql
chown -R mysql:mysql .
/etc/init.d/mysql start
mysql -u root -pYOUR_ROOT_PASSWORD
TokuDB
TokuDB_user_data
TokuDB_user_data_exact
TokuDB_file_map
TokuDB_fractal_tree_info
TokuDB_fractal_tree_block_map
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment