Connecting Power BI desktop from Virtual Machine to Ubuntu - mysql

I'm using Ubuntu 14.04.3 on my machine, so I have LAMP set up. I'm using Virtual Machine for Windows based apps. I've got Power BI Desktop running on my VM and would like to connect it to my local mysql DB.
It can't connect to it using neither localhost, nor my local IP (192.168.1.123 in this case).
Do I need to set up a port forwarding? Or is it just not possible to connect to my local DB like that?

If your localhost is inside the VM it should work. If your localhost is the Ubuntu box, you need to setup your network and use your Ubuntu's IP Address to receive the network requests.

Related

MySQL Remote Connection (Replication)

I have the following topology.
One Ubuntu 16.04. Instance on the Amazon AWS where my global MySQL Server is running. I want to use this Server as a Slave (Multi-Source Replication) for many local Master (Windows Machines MySQL Server).
For Testing Reasons I`ve Managed to make this running on one local Machine (with three different MySQL Server Running).
But now I want to make this Replication work on the mentioned global Server with the local ones. But it fails on the attempt to connect from the EC2 ubuntu Instance to the local Windows MySQL Server.
When I try to connect from my EC2 Instance to the local Computer with MySQL running on Port 3307 it keep saying:
ERROR 2003 (HY000): Can't connect to MySQL server on (113)
The strange Part is, that I can PING the Local Computer but not telnet it.
Telnet just says:
telnet: Unable to connect to remote host: No route to host
I can access the Global (EC2 / Ubuntu MySQL Server) from the local Machine but not the other way around.
I`ve already made a new Rule for this Port on the Windows Firewall Settings.
But the Port 3307 on the IPv4 Address seems to be still Closed.
I have no clue what I am missing to get a Connection from the EC2 Instance to my local Computer via TCP.
Do I have to open the Port Specific on the Router?
I hope for your help.
Best Regards.
It seems like your local computer is not visible, as your incoming ports to your local pc are closed. It may be a problem with your router, or your internet service provider, which is not allowing you to open ports(the most common one).
The possible solutions are:
1.) If your ports are not open due to the router
Try forwarding required ports to your pc.
Try Switching off your NAT firewall that may be blocking ports.
Try switching off your windows or antivirus firewall if any.
2.) If your ports are blocked by your Internet service provider.
Try getting help from ISP
Switch to a static IP connection if on dynamic.
Use a VPN service that provides an unblocked port service to all IPs.(This one solved my problem when I was struck in this situation.)

Cannot connect to mySql from a lan network computer

I have a MySql Server 5.7 running as service on one computer of a LAN.
My application is installed and running fine on the same computer. I have 'Shared with everyone' set for the directory where my application is located. In the same directory I have put the libmysql.dll and the FDConnectionDefs.ini files.
My application is running fine on that computer. On the other computers on the LAN I created a link to the directory where my application is shared. When I try to run my application from these LAN systems they produce the error message
[FireDac][Phys][mySql] can't connect to mySql server 127.0.0.1 on port 3306... (10061).
All machines are running Windows 10 on 64 bit processors.
Here what i've tried to resolve the problem:
make sure that the user, password and host (%) are the same in mySql Profile and FDConnectionDefs.ini.
I've tried with different users even with root, i've tried to change host (%) to put the IP address of the computer trying to connect in the mySql profile.
I make sure that i have permissions to run my application and mySql and that the port 3306 is open in the Firewall/Kaspersky on each computer of the LAN. But always the same error message.
127.0.0.1 is a special IP address - the "loopback" address that is typically resolved for localhost on most systems. It is a private internal IP address that a computer can use to refer to itself. It has no meaning to other systems on a LAN since every computer will recognize 127.0.0.1 as meaning itself.
This means that when you are running the application on a remote system it will be trying to connect to a MySQL server running locally rather than on a server elsewhere.
You'll need to configure your FireDac components to connect to the actual LAN IP address that belongs to the system hosting the MySQL server. You will probably also need to make sure that your MySQL users are set up to authenticate from an IP other than localhost.

Can't access MySQL via 3G connection

I have one strange situation that I need help with...
My Linux machine is connected to internet via 3G connection and it is set up to save collected data to MySQL database that is located on a shared hosting. It's been working like that for a couple of months now without problems and now I'm trying to switch from shared hosting to a new VPS server that I've rented two weeks ago.
On new server I have MySQL installed and working, tried the connection from my desktop machine via Workbench, as well as from my mobile phone.
When I try the connection on Linux machine - it just won't connect to MySQL (double checked all the parameters).
I am connecting via IP address on standard TCP 3306 port, I'm sure that port is open on Linux machine because it worked with shared hosting without problems, and on VPS I know is opened because I can connect from my home machine and mobile phone (both on separate networks).
It seems to me that IP address of VPS server can't be accessed from Linux for some reason, but I can't tell why.
Telnet to VPS IP via 3306 port works from my (windows) desktop machine, on Linux I've tried
nmap {IP address} -p 3306 -PN
and got response:
PORT STATE SERVICE
3306/tcp filtered mysql
Everything seems to be working from other networks except the one on Linux station, and I don't know where to look for the problem. I have also a windows laptop that is connected to the Linux station 3G network and it also does not recognize the VPS IP address (can't telnet to 3306 port), but when I connect laptop to tethered network from my mobile phone - telnet to 3306 works... I'm totally puzzled!
Does anyone have an idea what I might be doing wrong? Why the VPS can't be accessed via 3G network?
Any help would be appreciated!
Thanks!

How do I access services on a vm from the host when not connected to network?

I am running VirtualBox on MacOS, I have a windows xp vm. I also have mysql database running inside the vm. The vm is configured to use Bridged Network Adapter.
When I am connected to a wi-fi network (at home), I am able to connect to the data running on the vm from my mac (host), by using the IP address of the vm in the connection string.
How do I do this when I am not connected to the network (when I am travelling on a train for example)?
What setting do I need to change on the VM so that my host can connect to the mysql database running on the xp vm?
There is no need for the VM to access the outside network etc... It is enough for the host to be able to access the database on the vm.
This can be solved by using port forwarding in VirtualBox with NAT as the networking mode.

Connect Amazon EC2 to my Local MySQL Database

Is it possible to do the following?:
I have a local Mac running OS X Lion with a MySQL Server installed which runs different processes regularly and stores data into a local DB.
On the other hand I have an Amazon EC2 instance.
What I would like to do is to use the Amazon instance to perform certain cronjobs (using its own resources) but connecting to the data that is on my localhost (my computer) and performing basic SQL actions like updating the data, inserting, etc.
I don't know if this helps, but I have a static IP. Is there any way I can "open" my IP so the Amazon instance can recognize my home computer as a valid MySQL server?
Thanks for your help, any tip in the right direction will be much appreciated.
If your EC2 instance is connecting to your local db you'll need a static IP locally. Well not need... but if you don't have it anytime you reset your router or loose power etc your ip will change. You can look into Dynamic DNS as well for your local instance.
Your ISP will not block your port on your local instance. This would be a firewall inside your network that is preventing you from connecting to mysql or a configuration with mysql itself. Users can only connect to mysql from certain IP addresses.
You would have to open up the mysql port on your firewall if you are using one, have the mysql client installed on your EC2 instance, and make sure that the user that had proper grantable permissions.
That said why not run cron locally on the mac?
If you can login to your server via SSH then there's no need to open any other port and no static IP is required. You can use SSH port forwarding instead. From your local machine run:
ssh -C -R 5555:127.0.0.1:3306 <your-server-host>
Now you should be able to connect to your Mac's database running on localhost:3306 from the remote server at localhost:5555.