All Products
Search
Document Center

Create a MySQL schema

Last Updated: Apr 24, 2019

Procedure

  1. Log on to the Data Lake Analytics console.

  2. In the left-side navigation pane, click Endpoint. In the endpoint list, locate the row that contains the target endpoint and click Log on in DMS in the Actions column. Run the following statement to create a MySQL schema in DLA:

    1. CREATE SCHEMA hello_mysql_vpc_rds WITH DBPROPERTIES (
    2. CATALOG = 'mysql',
    3. LOCATION = 'jdbc:mysql://192.168.2.141:3306/dla_db',
    4. USER = 'dla_user',
    5. PASSWORD = 'dla_userpasswd',
    6. INSTANCE_ID = 'ecs_instance_id',
    7. VPC_ID = 'vpc_id'
    8. );
    • CATALOG: indicates the MySQL schema you want to create.

    • LOCATION: In the parameter value, 192.168.2.141 indicates the private address of the ECS instance. You can check the location on the Instance Details page of the ECS console. dla_db is the name of the MySQL database you created.

    • USER: indicates the username of the MySQL database you created.

    • PASSWORD: indicates the password of the MySQL database you created.

    • INSTANCE_ID: indicates the ID of the ECS instance. You can check the instance ID on the Instance Details page of the ECS console.

    • VPC_ID: indicates the ID of the VPC to which the ECS instance or DLA belongs. You can check the VPC ID on the Instance Details page of the ECS console or on the Overview page of the Data Lake Analytics console.