I would like to connect my Unix Virtual Machine (who hosted mariaDB and phpmyadmin) at my php web site hosted on Azure Web Site.
My virtual machine doesn't use virtual networks. I opened endpoint and I added one rule on iptables, but my php web site doesn't manage to connect on the VM.
If someone can help me.
Thanks in advance.
If you have opened 3306 port at your VM, please check your mysql db settings for example remote connection allowed or your connection user previlleges.
Related
I installed on VM--->server 2019, and on the server i have configured a Wamp server 3.1.9 version php 7.1, I have access to my project on my server, also i changed my localhost project to domain name and again i access to my project(url with authentication with no problem) its a ticketing system my project
The real problem now is that i can't connect from another pc on my local network from another vm machine
both the server and the client are on the same VMnet(0)
this is my conf file
Problem solved!!
Adding httpd.exe(WAMP Apache) application to firewall, rule application open connections for port 80, And one more rule for MySQL database tcp rule open connections for port 3306!!
I am trying to connect mysql database using php. But it is running fine on local machine but not when hosted online and error appeared as
mysqli_connect(): (HY000/2002): Connection timed out
<?php
$link = mysqli_connect('sql6.freesqldatabase.com','user_name','password','database_name');
if(mysqli_connect_error())
die("couldn't connect to database");
?>
Your MySQL server is probably not configured to accept requests from the host you're trying to access it from.
Check the configuration for the server.
Since you say the local machine can access it check where you permitted this and do the same for the ip of the online host.
In my case, AWS firewall was blocking my web server.
Adding the web servers IP address to the firewall exceptions fixed
this for me.
There might firewall in the host which is blocking the request to MySQL server. In my case adding the firewall rule helped me out.
Ubuntu
To allow one device to access the MySQL server,
sudo ufw allow from remote_IP_address to any port 3306
To allow any device to connect to MySQL server,
sudo ufw allow 3306
It worked!
If your website and MySQL database are hosted on separate servers, make sure that you've mentioned correct MySQL hostname (resolvable) in connection string.
In case you've specified the correct username, most probably your MySQL server isn't allowing remote MySQL connections from web server where you site resides.
Contact your web hosting provider for the exact MySQL hostname and to allow your web server IP address for remote MySQL connections.
I think you have to white list your hosting server's ip address to your DB server.
So your DB server will accept requests from your hosting server.
Specify the port (3306?) to the connection string as well.
Installed with hybrid connection manager in my azure account. tried to connect local LAN server from azure web app.
https://azure.microsoft.com/en-in/documentation/articles/integration-hybrid-connection-create-manage/
Followed all steps above but no use. credentials of my local host are correct as i have connected SQL server from xampp PHP server.
All I want to know where might be the mistake.
Thanks,
i have this problem:
I've created a Cms on my server hosted in Aruba (i call this My-server), i need to connect to a remote server (i call this external-server) to update its Database (Mysql) and ftp uploads via php.
I opened ports and connection in the external-server but it seems that Aruba blocks connection to external servers, even if tunnelling by port 80.
When i use my cms from virtual server (APache) on my laptop all works but when i moved to the server i got problems.
Any advice to solve the problem?
I cannot move my cms to external-server for politicy reason.
In your MySQL config add this
skip-external-locking
and in the config also remove this line below as if this is in place then no outsider can login.
bind-address = 127.0.0.1
restart the MYSQL after this.
You can asked Aruba to provide you access to port 80, 3306 etc. Just ask them I think they will remove it through their firewalls or iptables.
I have got a problem with my xampp on windows 7. Everythings work fine except when I try to connect to a remote database from my localhost. I've already enabled the remote access on the mysql server for my ip address and I've tried to turn off the windows firewall.
It seems like something prevents the outgoing connections from my localhost to remote host.
Someone can help me?
Thank you
CA
Check permissions on your MySQL server, it could be the user you are logging in as (against the DB) has localhost as it's hostname try setting the host name to % for the MySql login
What ip did you insert?
Time ago I had problems to connect to my localhost from an external pc/tablet that was in my local net. Finally the problem was solved when I used as ip to connect from a different pc where xammp was installed this: "http://192.168.1.128:80" Maybe is this