Configuring MySQL/MariaDB for SSB
After installing MySQL/MariaDB server, you must create a database and credentials for SQL Stream Builder (SSB) to be able to install the service on your cluster.
Before you begin
You need to install and configure MySQL or MariaDB based on which one you plan to use, before setting up the databases for SSB.
The following configuration only details the SSB specific steps. To install and configure MySQL or MariaDB, you must complete the basic steps in the Private Cloud Base documentation.
- Install and configure MySQL for Cloudera Software
- Install and configure MariaDB for Cloudera Software
Creating MySQL/MariaDB database for SSB
You need to create the MySQL/MariaDB dabase that will be used for the Streaming SQL Console.
- Log in as the
root
user to MySQL:mysql -u root -p Enter password:
- Create databases for the Streaming SQL
Console:
CREATE DATABASE ssb_admin DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
- Grant all privileges for the created
database:
GRANT ALL ON ssb_admin.* TO 'ssb_admin'@'%' IDENTIFIED BY '<password>';
- Confirm that you have created the Streaming SQL Console
database:
SHOW DATABASES;
Installing the MySQL Python Connector
You need to install the 8.0.23 version of the MySQL python connector for SSB to connect to the MySQL database.
Use the following sample commands to install the correct version for MySQL:
RHEL
- Install the python-pip
package:
sudo yum install python3-pip
- Create a directory where you install the
package:
mkdir -p /usr/share/python3
- Install mysql connector 8.0.23 using
pip:
sudo pip3 install mysql-connector-python==8.0.23 -t /usr/share/python3
Ubuntu
- Install the python-pip
package:
sudo apt-get install python3-pip
- Create a directory where you install the
package:
mkdir -p /usr/share/python3
- Install mysql connector 8.0.23 using
pip:
sudo pip3 install mysql-connector-python==8.0.23 -t /usr/share/python3