Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure MySQL data sources in Redash

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

Today, I will talk to you about how to configure MySQL data sources in Redash. Many people may not know much about it. In order to make you understand better, the editor has summarized the following for you. I hope you can get something according to this article.

Centos8 connects to mysql data sources

1) execute the command to install mysql:

Sudo yum install mysql

2) verify that the installation is successful:

Which mysql

Which mysqldump

3) Log in to the mysql database, create remote login users and authorize:

Example: (where root is the login user and 123456 is the login password)

GRANT ALL PRIVILEGES ON *. * TO 'root'@'%' IDENTIFIED BY' 123456 'WITH GRANT OPTION

4), and then open the remote login account of MySQL:

Flush privileges

5) check the ip address of your mysql server, get the ip address and execute it under centos8:

(root stands for mysql database login user name, 123456 for mysql database login password, 192.168.137.1 for mysql database ip address, 3306 for port, test for database)

Mysql-u root-p123456-h 192.168.137.1-P 3306-D test

6) install mysql data source can be connected in redash

1. Install mysql-devel on the centos8 command line:

Sudo yum install mysql-devel

two。 Enter the redash directory and execute:

Source venv/bin/activate

Pip3 install mysqlclient

After running, you can log in to Redash. Select mysql data source from the new data source and enter relevant parameters.

Docker environment configures MySQL data sources

1. Find the original redash image id through docker image ls, which is assumed to be aaabbb

two。 Start a docker environment for redash

Docker run-ti / bin/bash

Example: docker run-ti aaabbb / bin/bash

3. Now that you are in a docker environment, execute

Pip install mysqlclient==1.3.14

4. Open another terminal and execute docker ps to find the container id that you just started. Here, assume it is cccddd.

Docker commit

Example: docker commit cccddd redash:new

5. Now a new redash image is generated. Directly use the new redash image to have the mysql data source.

After reading the above, do you have any further understanding of how to configure MySQL data sources in Redash? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report