1.4.1.1. Setting Up a MySQL Database

You can deploy a MySQL instance using one of the following options:

  • Option I: Allow HDP to deploy MySQL instance

    1. On the master install machine, edit the master-install-machine/gsInstaller/gsInstaller.properties file and provide values for the following properties:

      dbflavor=mysql 
      dbhost=$FQDN_of_MySQL_host_machine
    2. On the master install machine, deploy a MySQL client.

    3. Execute the auxiliary script startMySql.sh:

      sh master-install-machine/gsInstaller/startMySql.sh
  • Option II: Manually deploy MySQL

    1. Connect to the host machine where you plan to deploy MySQL instance and from a terminal window, type:

      • For RHEL and CentOS:

        yum install mysql-server
      • For SLES:

        zypper install mysql
    2. Start the instance.

      • For RHEL and CentOS:

        /etc/init.d/mysqld start
      • For SLES:

        /etc/init.d/mysqld start 
    3. Set the root user password and remove unnecessary information from log and STDOUT

      mysqladmin -u root password $password 
      mysqladmin -u root 2>&1 >/dev/null

loading table of contents...