REDASH MySQL Connection Test Failed: Can't connect to MySQL server on '127.0.0.1' (111)


#1

REDASH While configure new data source for MySQL get error :

Connection Test Failed:
Can’t connect to MySQL server on ‘127.0.0.1’ (111)

While I connect with same parameters with MySQL Workbench

sudo netstat -ntlup | grep mysql
[sudo] password for frappe:
tcp6 0 0 :::3306 :::* LISTEN 1447/mysqld

GRANT ALL PRIVILEGES ON . TO ‘root’@’%’ IDENTIFIED BY ‘root’ WITH GRANT OPTION;
FLUSH PRIVILEGES;

frappe@ubuntu:~$ mysql -uroot -proot -hlocalhost
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 10.2.20-MariaDB-10.2.20+maria~xenial-log mariadb.org binary distribution

Copyright © 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

MariaDB [(none)]>

Thanks in advance.


#2

Any Feedback
Thanks in advance


#3

How and where did you deploy Redash?


#4

I deploy redash on my local vm for ubuntu-16.04.5-desktop-amd64
I follow the steps in https://redash.io/help/open-source/dev-guide/docker

Thanks in advance.


#5

Any Feedback
Thanks in advance


#6

The Docker containers run in a different network, so you can’t just use localhost to access a database running on the host machine. You need to reference it with the IP address assigned to the host machine in the Docker network. Also need to make sure that MySQL listens on this address.