Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Show all

Help Center/ MapReduce Service/ FAQs/ Component Configurations/ How Do I Configure Other Data Sources on Presto?

How Do I Configure Other Data Sources on Presto?

Updated on 2024-08-16 GMT+08:00

This topic uses the MySQL data source as an example.

  • For MRS 1.x and 3.x clusters, do the following:
    1. Log in to the MRS management console.
    2. Click the name of the cluster to go to its details page.
    3. Click the Components tab and then Presto in the component list. On the page that is displayed, click the Configurations tab then the All Configurations sub-tab.
    4. On the Presto configuration page that is displayed, find connector-customize.
    5. Set Name and Value as follows:

      Name: mysql.connector.name

      Value: mysql

    6. Click the plus sign (+) to add three more fields and set Name and Value according to the table below. Then click Save.

      Table 1 Parameter description

      Name

      Value

      Description

      mysql.connection-url

      jdbc:mysql://xxx.xxx.xxx.xxx:3306

      Database connection pool

      mysql.connection-user

      xxxx

      Database username

      mysql.connection-password

      xxxx

      Database password

    7. Restart the Presto service.
    8. Run the following command to connect to the Presto Server of the cluster:

      presto_cli.sh --krb5-config-path {krb5.conf path} --krb5-principal {User principal} --krb5-keytab-path {user.keytab path} --user {presto username}

    9. Log in to Presto and run the show catalogs command to check whether the data source list of Presto can be queried.

      Run the show schemas from mysql command to query the MySQL database.

  • For MRS 2.x clusters, do the following:
    1. Create the mysql.properties configuration file containing the following content:
      connector.name=mysql
      connection-url=jdbc:mysql://IP address of MySQL:3306
      connection-user=Username
      connection-password=Password
      NOTE:
      • The IP Address of MySQL is that of the MySQL instance, which must be able to communicate with the MRS cluster.
      • The username and password are those used to log in to the MySQL database.
      • Configuration files containing authentication passwords pose security risks. Delete such files after configuration or store them securely.
    2. Upload the configuration file to the /opt/Bigdata/MRS_Current/1_14_Coordinator/etc/catalog/ directory on the Master node (where the Coordinator instance resides) and the /opt/Bigdata/MRS_Current/1_14_Worker/etc/catalog/ directory on the Core node (depending on the actual directory in the cluster), and change the file owner group to omm:wheel.
    3. Restart the Presto service.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback