4 Installation

The following instructions describe how to install the airportdb database on a MySQL DB System.

On AWS, use the Import sample data feature in MySQL HeatWave Console to import airportdb into a DB System. See Importing Sample Database for details.

On Oracle Cloud Infrastructure (OCI), two methods are provided for installing airportdb:

The Object Storage method requires uploading the airportdb data files to an Object Storage bucket from where they are loaded into the MySQL DB System. The Compute instance method does not involve an Object Storage bucket; data files are downloaded to the Compute instance, from where they are loaded into the MySQL DB System.

Warning

The airportdb sample database can be installed on an on-premise MySQL Server instance, but due to the volume of data, it is only advisable to do so if your system has sufficient disk space and is capable of supporting large load operations consisting of millions of rows of data.

Installing airportdb on OCI from Object Storage

The installation procedure involves downloading the airportdb sample database, uploading the data files to an Object Storage bucket, and importing the data from the Object Storage bucket into the MySQL DB System using the MySQL Shell Dump Loading utility.

Before you begin, ensure that you have the following:

To install the airportdb sample database:

  1. Download the airportdb database to a temporary location such as /tmp/ or C:\temp\ and unpack it. The airportdb sample database is provided for download as a compressed tar or Zip archive. The download is approximately 640 MBs in size.

    wget https://downloads.mysql.com/docs/airport-db.tar.gz
    tar xvzf airport-db.tar.gz

    or

    wget https://downloads.mysql.com/docs/airport-db.zip
    unzip airport-db.zip

    Unpacking the compressed tar or Zip archive results in a single directory named airport-db, which contains the data files.

  2. Log in to your Oracle Cloud Infrastructure (OCI) account and upload the airportdb data files from the airport-db directory to an Object Storage bucket. For information about loading data into an Object Storage bucket, see Putting Data into Object Storage.

  3. SSH to the Compute instance using the opc user and the public IP address of the compute instance. For additional information about connecting to a Compute instance, see Connecting to an Instance.

    ssh opc@computeInstancePublicIP
  4. Start MySQL Shell and connect to the MySQL DB System Endpoint. For additional information about connecting to a DB System, see Connecting to the MySQL DB System with SSH and MySQL Shell.

    mysqlsh Username@IPAddressOfMySQLDBSystemEndpoint
  5. Load the airportdb data files into the MySQL DB System using the MySQL Shell Dump Loading utility. The bucket name and namespace are required.

    MySQL>JS> util.loadDump("airportdb", {threads: 16, deferTableIndexes: "all", 
              osBucketName: "bucket-name", osNamespace: "name_space", 
              ignoreVersion: true})
    Note

    The deferTableIndexes: "all" option defers creating secondary indexes until after the table data is loaded, which significantly reduces load times. If you intend to use airportdb with HeatWave, which does not use secondary indexes, you can avoid creating secondary indexes by specifying the loadIndexes: "false" option instead of deferTableIndexes: "all". For more information about MySQL Dump Load options, see MySQL Shell Dump Loading utility.

After the data is imported into the MySQL DB System, you can load the tables into HeatWave. For instructions, see Section 5, “Loading airportdb into HeatWave”.

Installing airportdb on OCI from a Compute Instance

The installation procedure involves downloading the airportdb database to a Compute instance and importing the data from the Compute instance into the MySQL DB System using the MySQL Shell Dump Loading utility.

Before you begin, ensure that you have the following:

  • The MySQL DB System's Endpoint (its private IP address), and a MySQL DB System administration user name and password. For information about retrieving the MySQL DB System Endpoint, see MySQL DB System Details.

  • The public IP address of the Compute instance used to connect to the MySQL DB System. For information about the Compute Service, see Overview of the Compute Service.

  • MySQL Shell 8.0.22 or higher installed on the Compute instance. For installation instructions, see Connecting to the MySQL DB System with SSH and MySQL Shell.

  • A valid OCI CLI configuration file. See SDK and CLI Configuration File. If you have not installed and configured the OCI CLI, you must either install it or create a configuration file manually.

To install the airportdb database:

  1. SSH to the Compute instance using the opc user and the public IP address of the compute instance. For additional information about connecting to a Compute instance, see Connecting to an Instance.

    ssh opc@computeInstancePublicIP
  2. Download the airportdb sample database and unpack it. The airportdb sample database is provided for download as a compressed tar or Zip archive. The download is approximately 640 MBs in size.

    wget https://downloads.mysql.com/docs/airport-db.tar.gz
    tar xvzf airport-db.tar.gz

    or

    wget https://downloads.mysql.com/docs/airport-db.zip
    unzip airport-db.zip

    Unpacking the compressed tar or Zip archive results in a single directory named airport-db, which contains the data files.

  3. Start MySQL Shell and connect to the MySQL DB System Endpoint. For additional information about connecting to a DB System, see Connecting to the MySQL DB System with SSH and MySQL Shell.

    mysqlsh Username@IPAddressOfMySQLDBSystemEndpoint
  4. Load the airportdb database into the MySQL DB System using the MySQL Shell Dump Loading utility.

    MySQL>JS> util.loadDump("airport-db", {threads: 16, deferTableIndexes: "all", 
              ignoreVersion: true})
    Note

    The deferTableIndexes: "all" option defers creating secondary indexes until after the table data is loaded, which significantly reduces load times. If you intend to use airportdb with HeatWave, which does not use secondary indexes, you can avoid creating secondary indexes by specifying the loadIndexes: "false" option instead of deferTableIndexes: "all". For more information about MySQL Dump Load options, see MySQL Shell Dump Loading utility.

After the data is imported into the MySQL DB System, you can load the tables into HeatWave. For instructions, see Section 5, “Loading airportdb into HeatWave”.