×
Community Blog Data Visualization with Alibaba Cloud ECS: From Installation to Data Analysis

Data Visualization with Alibaba Cloud ECS: From Installation to Data Analysis

This article guides you through setting up an Alibaba Cloud ECS Windows 2022 server, deploying MySQL and Grafana for data visualization using GUI-base.

Introduction

No doubt, effective data visualization not only reveals hidden patterns but also provides actionable insights that drive strategic growth. This guide walks you through setting up an Alibaba Cloud ECS Windows 2022 server, deploying MySQL and Grafana for visualization using GUI-based methods. You’ll learn to integrate these tools, create tables, and visualize data effectively. To see the final result, please watch this video:

Step 1: Alibaba Cloud ECS Setup

a) Navigate to Alibaba Cloud: Visit https://www.alibabacloud.com/ and log in to your account.

b) Create a New ECS Instance: Go to the ECS service page, select the appropriate Region and click Create Instance.

1

After selecting the VPC, choose a configuration with 4 vCPUs, 16GB RAM, and a 40GB SSD disk. Pick Windows Server as the OS type, under the Public Images and select Assign Public IPv4 Address option.

2
3

c) Configure Security Group: We can either use an existing Security Group or create a new one. However, it is essential to set up inbound rules of the Security Group to allow accessibility to port 3306 (MySQL) and 3000 (Grafana).

4

d) Start the Instance: It is important to set the Custom Password. You may label the Instance properly using the Instance Name. Once done, Click Create Order to launch your ECS instance.

5

Step 2: Log into the ECS Instance

a) Once the instance is in the running state, click on the connect option in the right corner.

6

b) After clicking the Connect button, a new window will pop up. In this window, select the Sign in Now option. Next, the Instance Login window will prompt you to enter your login password. After providing the login password, click OK.

7

c) The next screen that appears will show the Desktop of the ECS instance.

8

Step-3 and Step-4 will guide you how to install MySQL and Grafana on windows ECS instance that you just created. You can watch this video for the installation steps as well:

Step 3: MySQL Installation and Configuration

a) Download MySQL Installer: Use the browser on ECS instance, visit the MySQL official website at https://dev.mysql.com/downloads/installer/ and download the MySQL Installer for Windows.

9

If it prompts for the sign up, click on the option No thanks, just start my download.

10

b) Run the Installer: Double-click the downloaded file to start the installation process. Choose Full and click Next.

11

System will prompt you for installing Microsoft Visual C++, select the execute option to install it.

12

For the rest of the steps, just follow the default options to proceed to the installation products page as shown below.

13

c) Configure MySQL root password: During the installation process, the installer will ask for setting the MySQL root password.

14

This login password will later be used to connect Database clients (MySQL workbench) and Grafana to MySQL server. For the remaining steps, simply use the default options.

15

You may be prompted to check the connection to MySQL server. Provide the database root password and click Next after successfully connecting to the MySQL server.

16

Once the installation is complete, ECS instance will have MySQL Sever running, with MySQL workbench and other tools installed on it.

17

Step 4: Create a Database and Table

Use MySQL Workbench, which is included in the installation, to create a new database and table:

  • Open MySQL Workbench: Connect to your local MySQL server

18

You may need root password to connect to the MySQL server.

  • Create a Database: Go to Schema > Right click, select Create Schema and define your database Name. Alternatively, we may use the SQL editor tab of MySQL workbench to create the database then create table and insert some data. For this example, we are using testdb and mytable as the database and table name respectively. The table has two columns i.e. Name and Age. For the sake of demo, we are inserting two data points in the database.

19

To check the data, use select statement.

20

Step 5: Grafana Installation

1.  Download Grafana Installer: Using ECS instance browser, obtain the latest Windows package from Grafana's official website: https://grafana.com/grafana/download?platform=windows

21

2.  Run the Installer: Click the downloaded .exe file to start the installation. Follow the on-screen instructions and select default options to proceed with the installation.

22

3.  Using Grafana: Once installed, Grafana should start automatically. To access it, open web browser on your own computer (not ECS) and use public IP address of your ECS instance with port 3000. i.e. ECSPublicIP:3000. It will take you the login page. The default username and password for Grafana is admin/admin.

23

Once click on login, it will ask for the new password. Set the new login password for Grafana accordingly.

Step 6: Connect MySQL to Grafana

Use the following steps to establish connection between MySQL database and Grafana.

a) Add Data Source: In Grafana, navigate to the Connections and click Data Sources. Click Add Data Source and select MySQL from the list.

24
25
26

b) Enter MySQL Connection Details: Fill in the connection details for your MySQL server: host (localhost), port (3306), database name (testdb), username (root), and password of the MySQL database. Test the connection to ensure it works.

27
28

c) Create a Dashboard: Scroll up on the same page, and Click on the option Build a dashboards, available in the top right corner. Then click on Add Visualization.

29
30

d) Query Data: Use the following options to query and visualize the data using Donut Chart. You can customize your panel with graphs or tables, adjust titles, colors, and labels to fit your needs

31
32

e) Visualize Data: After the configurations, click Apply button in the right corner to see the data on the dashboard.

33

To save the dashboard, press the save icon in the right menu. You can also make the dashboard public if you want to share it across the internet.

Conclusion

We've successfully set up an Alibaba Cloud ECS Windows 2022 server, deployed MySQL, and configured Grafana for visualization. You're now ready to leverage your data for insightful analyses and decision-making. Keep your server and database secured, regularly update your tools, and explore Grafana plugins for more advanced visualization capabilities.

0 1 0
Share on

JwdShah

6 posts | 2 followers

You may also like

Comments

JwdShah

6 posts | 2 followers

Related Products