Installing MySQL client for MySQL databases
CDP uses Python version 3.8. To use MySQL as a backend database for Hue, you must install the MySQL client and other required dependencies on all the Hue hosts based on your operating system.
- SSH into the Hue host as a root user.
- Download the MySQL yum repository as follows:
curl -sSLO https://dev.mysql.com/get/mysql80-community-release-el7-5.noarch.rpm
- Install the package as
follows:
rpm -ivh mysql80-community-release-el7-5.noarch.rpm
- Install the required dependencies as follows:
yum install mysql-devel yum install -y xmlsec1 xmlsec1-openssl
For MySQL version 8.0.27, add themysql-community-client-8.0.25
client package as follows:yum install mysql-community-client-8.0.25
- Add the path where you installed the MySQL client and packages to the PATH environment
variable as follows:
export PATH=/usr/local/bin:$PATH
- Install the MySQL client as follows:
pip3.8 install mysqlclient
- SSH into the Hue host as a root user.
- Download the MySQL yum repository as follows: (RHEL 7)
curl -sSLO https://dev.mysql.com/get/mysql80-community-release-el7-5.noarch.rpm
(RHEL 8)curl -sSLO https://dev.mysql.com/get/mysql80-community-release-el8-8.noarch.rpm
- Install the package as follows:(RHEL 7)
rpm -ivh mysql80-community-release-el7-5.noarch.rpm
(RHEL 8)rpm -ivh mysql80-community-release-el8-8.noarch.rpm
- Install the required dependencies as follows:
yum install mysql-devel yum install -y xmlsec1 xmlsec1-openssl
- Add the path where you installed the MySQL client and packages to the PATH environment
variable as follows:
export PATH=/usr/local/bin:$PATH
- Install the MySQL client as follows:
pip3.8 install mysqlclient
- SSH into the Hue host as a root user.
- Install the required packages and dependencies as follows:
zypper install libmysqlclient-devel zypper install xmlsec1 zypper install xmlsec1-devel zypper install xmlsec1-openssl-devel
- Add the path where you installed the packages to the PATH environment variable as follows:
export PATH=/usr/local/bin:$PATH
- Install the MySQL client as follows:
pip3.8 install mysqlclient
- SSH into the Hue host as a root user.
- Install the required packages and dependencies as follows:
apt-get install libmysqlclient-dev apt-get install -y xmlsec1 apt-get install libxmlsec1-openssl
- Add the path where you installed the packages to the PATH environment variable as follows:
export PATH=/usr/local/bin:$PATH
- Install the MySQL client as follows:
pip3.8 install mysqlclient