Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
tessa1
Contributor II
Contributor II

connect database MySql workbench but de error: "Name or service not known"

I try connect database MySql workbench but de error: "Name or service not known" and the database postgres de same error (database is local and the hostname: localhost or 127.0.0.1), but I connect with powerbi and python is working.

I have de case: 00143587 , but I don´t have any answer  

Labels (1)
  • SaaS

7 Replies
henrikalmen
Specialist
Specialist

You have posted this is the forum Qlik Cloud Data Integration. If you're in Qlik Cloud, you could probably not connect to localhost.

tessa1
Contributor II
Contributor II
Author

I try to connect to a local MySql database but a problem occurs and the connection is not established

tessa1_0-1708002321270.png

- Turned off the laptop firewall
-The line that has been added to the my.ini file
- dns has been configured
- the ports open
- services have been restarted 

If you know how I can solve the problem I would greatly appreciate it.

henrikalmen
Specialist
Specialist

"loacalhost" and the ip 127.0.0.1 is only reachable from within that very computer. It's a local name and a local IP that only exist in that computer. Or in any computer. For a cloud solution to be able to connect to a database on a local machine, the database must be exposed to the internet on a public address and not a local address (localhost and 127.0.0.1) are local addresses). https://www.baeldung.com/cs/127-0-0-1-vs-localhost

tessa1
Contributor II
Contributor II
Author

I tried with public addres, 

 

tessa1_0-1708026800689.png

So you can't make a connection to a local database? as normally done when testing a local database against qlik sence

henrikalmen
Specialist
Specialist

This is not unique to Qlik Sense; nothing - no BI System or service - can connect to a local database on your computer (if the connecting system is not on your computer (by "your computer" I mean for example your laptop or other personal computer); Qlik Sense Desktop installed locally on your computer can probably use a local database).

But you are on the right track here in the image you posted now. If you have a public ip adress that can be reached from the outside world - and it seems you do - it can be possible to setup a connection that can access your database. But then there could be issues with what is called "ports", and you may need to set up "port forwarding" in your local router. Just because you have the public IP, a firewall (in your router and/or in your Windows settings) may block calls to your database. Among other issues you may encounter.

 

tessa1
Contributor II
Contributor II
Author

Enter the public IP that I sent in the graph, port 0 according to a forum and another error occurs, the firewall was inactivated for testing

tessa1_0-1708031848555.png

other error with port 3306

tessa1_2-1708031991036.png

 

 

henrikalmen
Specialist
Specialist

I can't say exactly what this means with your setup, but I'm guessing Qlik can't reach all the way to the db on your machine. As I said in my previous reply, there can be multiple reasons for that. I suggest you start by trying to connect to your db from another machine with a tool like for example MySQLWorkbench or DBeaver, preferably first on the same network and then over internet "from the outside" and make sure that you can connect properly. When you have managed to connect like that from another computer on the internet, you can start trying to connect from Qlik.