2. Installation

2.1. Download

mysql_sphere is not part of the MySQL or MariaDB software. You can download it from the mysql_sphere repository at GitHub: http://github.com/adrpar/mysql_sphere/

2.2. Installation

You will need MySQL 5.5 or above. We assume that you have MySQL or MariaDB already compiled and installed. Please note: Depending on your system configuration mostly you have to be logged in as the system superuser.

To compile mysql_sphere, you will need:

After you have downloaded mysql_sphere from GitHub, you need to edit the (mysql_sphere/CMakeList.txt) configuration file. There you either let cmake try to find your MySQL installation itself or if required you need to adjust the path to your MySQL installation by uncommenting and setting

set(MYSQL_PATH "/usr/local/mysql")
to the corresponding directory. Then you need to point cmake to the source files of your MySQL installation by setting
set(MYSQL_SOURCES_PATH "/usr/src/mysql/mysql-5.5")
to the corresponding directory.

Then, you need to create the directories for the build process with the following two commands:


shell> mkdir build

shell> cd build
Then you need to run cmake to configure the build process by envoking

shell> cmake ..
Afterwards you can build mysql_sphere the usual way by envoking

shell> make
and then

shell> make install
. This should have copied the mysql_sphere plugin into the according MySQL / MariaDB plugin directory. If not, then you need to do so manually. The next step will register the plugin with MySQL / MariaDB. For this, you invoke

shell> mysql --user=root --password=YOUR_SECRET_PASSWORD_HERE < ../install_udfs.sql
accordingly. With this, you should be ready to go. You can check if mysql_sphere has been successfully installed by invoking

shell> mysql --user=root --password=YOUR_SECRET_PASSWORD_HERE -e "SELECT mysql_sphere_version();"
You should see the current mysql_sphere version on your terminal. In order to uninstall mysql_sphere you can run the following

shell> mysql --user=root --password=YOUR_SECRET_PASSWORD_HERE -f < ../deinstall_udfs.sql