-
Notifications
You must be signed in to change notification settings - Fork 2
Installation
The following instructions have been tested on Ubuntu 15. Other linux distributions (and MacOS) might differ; in that case please modify the page. Windows is not yet supported.
The upscaledb key/value database version 2.2.1 is not yet released. It requires a few dependencies; on Ubuntu, the following packages need to be installed:
- protobuf-compiler
- libprotobuf-dev
- libgoogle-perftools-dev
- libboost-system-dev
- libboost-thread-dev
- libboost-dev
Afterwards, upscaledb 2.2.1 can be downloaded and compiled by following these steps:
git clone https://github.com/cruppstahl/upscaledb.git
cd upscaledb
git checkout topic/2.2.1
sh bootstrap.sh
./configure
make -j 5 && sudo make install
Make sure to check the output of configure
for any errors.
MySQL server sources are hosted on GitHub. The following commands check out the sources and compile version 5.7.12 (newer versions might also work, but were not tested).
git clone https://github.com/mysql/mysql-server.git
cd mysql-server
git checkout mysql-5.7.12
Now copy the storage/upscaledb
copy from the upscaledb-mysql repository into the directory with the mysql-server sources (you might have to adjust the paths).
cp -r ~/upscaledb-mysql/storage/upscaledb ~/mysql-server/storage
Then build the MySql server; this will include the upscaledb storage engine.
cd ~/mysql-server
cmake -DCMAKE_BUILD_TYPE=Release
make -j 5
Now you can either install MySQL on your system, or you copy the storage engine plugin to your existing MySQL installation directory.
Option 1: Install MySQL and start it (you might want to start it with different options, and a different datadir
):
sudo make install
cd /usr/local/mysql/bin
./mysqld --gdb --datadir=/home/chris/tmp/mysql-data
This will start mysqld in the terminal window; press ctrl-c to stop the process.
Option 2: To install the upscaledb storage engine for use with an existing MySQL installation, copy the plugin to the lib/plugin
directory of MySQL (the path depends on the linux distribution), then restart the mysqld process:
sudo cp storage/upscaledb/ha_upscaledb.so /usr/local/mysql/lib/plugin
sudo service mysql restart
Now that the upscaledb storage engine (and MySQL) was installed, there's just one step left: registering the storage engine. Start the mysql console and run the following SQL command:
mysql> INSTALL PLUGIN upscaledb SONAME 'ha_upscaledb.so';
You can now test the installation by creating a new table using the upscaledb storage handler:
mysql> CREATE TABLE test (id INTEGER) ENGINE=UPSCALEDB;
mysql> SHOW CREATE TABLE test;