In this video we will learn how to setup MySQL on the Mac with Homebrew. We will also setup a test username, password and database.Links:Sign up for the From. Install brew services first: $ brew tap homebrew/services. Load and start the MySQL service: $ brew services start mysql. Expected output: Successfully started mysql (label: homebrew.mxcl.mysql) Check of the MySQL service has been loaded: $ brew services list 1. Verify the installed MySQL instance: $ mysql -V.

Mysql

Arm brew install [email protected] arm brew services start [email protected] Setup default root password with the following command mysqlsecureinstallation It will prompt you steps. In this tutorial we will learn how to install MySQL (via Homebrew (This is much faster and more easier then in. Feb 22, 2020 Install MySQL. At the time of this writing, the default version of MySQL in Homebrew is 8.0. We can check this by running brew info mysql. However, we’re aiming to install version 5.7 so let's.

You will need Python, some OS packages, a Database and Node.js.

Python

Wii homebrew channel

Hue employs some Python modules which use native code and requires certain development libraries be installed on your system. To install from the tarball, you'll need these library development packages and tools installed on your system:

Versions supported:

  • Python 2.7
  • Python 3.6+

Database

Hue is being ran the most with MySQL InnoDB, PostgreSQL or Oracle.

MySQL / MariaDB

The client lib MySQL-python is already included so it should work out of the box.

Note

With the recent OSs like Ubuntu 20.04 or using Python 3, the MySQL-python lib won't compile properly and will produce an error similar to:

The lib folder needs to be swapped with https://pypi.org/project/mysqlclient/. Unfortunately for licensing reason (GPL vs Apache) this can't be officially done in the Hue repository.

Remove and add the compatible MySql lib with these two commands:

Read HUE-9390 for more details.

PostgreSQL

You would need the OS python-psycopg2 or Python psycopg2.

Oracle

How to install the client lib.

Version 11

Download both instantclient-basic and instantclient-sdk of the same version (11.2.0.4.0 for this example) and on your ~/.bash_profile, add

and then

then unzip the content of both downloaded zip files into the newly created $ORACLE_HOME in a way that the ‘sdk’ folder is at the same level with the other files and then

and finally

Version 12

Hue comes with an older Oracle client cx_Oracle-5.2.1 Python module so it will fail. We need to do the above client install and then upgrade Hue's client module to at least cx_Oracle-5.3.

Make sure you have the python-dev package dependencies, ensure that ORACLE_HOME and LB_LIBRARY_PATH are properly set so that pip knows which version to install, then:

Tip: You can also wget the proper cx_Oracle file yourself: https://pypi.python.org/pypi/cx_Oracle/.

Tip: Going to where is the Oracle client, e.g. /usr/local/share/oracle then creating a symlink similar to below could even trick the cx_Oracle-5.2.1 module to work with 12.2 without doing the pip upgrade:

There is more details on this Apply Temporary Workaround for Oracle 12 Client.

Mac

OS Packages

Ubuntu

With Python 3, also:

CentOS/RHEL

Homebrew Install Mysql
  • mvn (from apache-maven package or maven3 tarball)
  • libtidy (for unit tests only)
  • openssl-devel (for version 7+)

SLES 12

Tip: if you run into building kerberos extension issue and see message krb5-config: command not found, install and append it to environment variable PATH.

MacOS

  • Xcode command line tools

Big Sur on M1 or Intel with Python 3

This is a verified step-by-step guide on how to get up and running on a fresh installation of macOS Big Sur, tested on both M1 and Intel based MacBook Pro.

  1. Clone the Hue repo

    git clone https://github.com/cloudera/hue.git

  2. Install Brew if not already installed

    /bin/bash -c '$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)'

  3. Install postgres (unless you prefer something else)

    brew install postgres

  4. Start Postgres

    brew services start postgresql

  5. Create the hue database and set permissions

  6. Install gmp, openssl and libffi (Note some might be installed from postgres)

    brew install gmp openssl libffi

  7. Install python, tested with the “macOS 64-bit installer” 3.7.9 direct download from python.org.https://www.python.org/ftp/python/3.7.9/python-3.7.9-macosx10.9.pkg

    • For M1 Macs, 3.7.9 from python.org is the only one that works and none of the homebrew version work at the time of writing.

    • For Intel Macs, other 3.x Python versions as well as Homebrew might work. However, direct download from python.org is preferred and tested.

  8. Install mysql client

    brew install mysql

  9. Install node and npm (unless already present)

    brew install node

  10. In the cloned hue folder run:

  11. Configure Hue to your liking, edit

    desktop/conf/pseudo-distributed.ini

    For postgres according to step 5 above set:

  12. If you use postgres as configured in the previous step you'll need to add the psycopg2 lib manually

    ./build/env/bin/pip install psycopg2-binary

  13. Start Hue (note that export from step 10 above needs to be active)

    ./build/env/bin/hue runserver 0.0.0.0:8888

10.14, 10.15

Install Dependencies via Homebrew

Install Xcode command line tools

Fix openssl errors (required for MacOS 10.11+)

If runserver stops abruptly with a 'zsh: abort' message

If you are getting Could not find Python.h message

Homebrew Install Mysql 5.6

On macOS 10.15+, install an older version of openssl

Fix the possible missing Python headers message by installing the MacOS SDK headers

On macOS 10.14.x

On macOS 10.15.x

NodeJs

e.g. how to install on Ubuntu:

For Centos / Red Hat use this source:

Upgrade to npm 7+:

Installing Python 2.7

CentOS 6.8 / 6.9 OS

Check your OS Version:

Make sure “/etc/redhat-release” contains “CentOS 6.8 or 6.9” version. These instructions are tested on CentOS 6.8 and 6.9 versions only. It may or may not work on previous CentOS 6 series OS.

RedHat 6.8 / 6.9 OS

Homebrew Install Mysql 5.6

Where does homebrew install mysql

Check your OS Version

Make sure /etc/redhat-release contains “RedHat 6.8 or 6.9” version. These instructions are tested on RedHat 6.8 and 6.9 versions only. It may or may not work on previous RedHat 6 series OS.

Oracle 6.8 / 6.9 OS

Check your OS Version

Make sure /etc/redhat-release contains “Oracle 6.8 or 6.9” version. These instructions are tested on Oracle 6.8 and 6.9 versions only. It may or may not work on previous Oracle 6 series OS.

Homebrew Install Mysql 8

Set the value of the enabled parameter for the software_collections repository to 1: for file /etc/yum.repos.d/public-yum-ol6.repo

for more details, refer to this link: https://docs.oracle.com/cd/E37670_01/E59096/html/section_e3v_nbl_cr.html

Java

Optional.

Java is only for the JDBC proxy connector which is not built automatically anymore.

Install Oracle JDK

On Ubuntu 16.04 or less only:

Install

On Centos:

On Mac:

Supported Browsers

The two latest LTS versions of each browsers:

Homebrew Install Mysql 5.5

  • Edge
  • Safari
  • Chrome
  • Firefox