I am using Linux Mint Olivia.
Recently i have installed Wordpress on my local apache server (Lamp).
It was working fine but when i restarted my computer and tried to connect to local server it kept showing following message
Error establishing a database connection
After spending few hours, i have understood that this error occurred because of IP address of my machine changed every time i re-connect to Internet.
bind-address = 192.***.**.**
So whenever i tried to connect web server from browser , i have to edit /etc/mysql/my.cng
files and change
bind-address to new IP address.
How can i fix this problem so that /etc/mysql/my.cng file automatically keep track of new IP address.
Thanks
Don't bind the LAN ip address to your mysql server setup. Comment that line out. This way, you can setup your wordpress to connect to mysql server "localhost" or "127.0.0.1" local loopback address.
Or
Fix your network adapter to one of the 192.xxx ip you get from DHCP, so that it doesn't change on reconnect.
Related
I have a bit of a bizarre problem. I have a Hyper-V VM and I cannot connect to it via IP address on the host computer.
I intend to use it as an SQL server to host a database for a website while I test it, and the first step I can see in this endeavour is to make sure the IP addresses work externally.
Other PCs on the LAN appear to be able to connect just fine via the IP address on Remote Desktop. I cannot do so. I also cannot connect through SQL Management Studio (named pipes or TCP/IP). Although named pipes gives an error relating to being denied access as opposed to IPs which are just not found.
I have tried pinging both ways:
VM => Host : Always gives a "Destination Host Unreachable" error
Host => VM: Always gives a "Request Timed Out" error
As for netstat -a -n, I can see that the VM is listening to 3389 (default Hyper V port, which makes sense).
Regarding Firewalls, all have been turned off on all machines. I can tell that the firewall is not the issue.
If you need any more information to help me to diagnose and treat the problem, please ask me as I would like to get this sorted as quickly as possible.
Thanks a lot in advance.
Which windows server version do you use?
Windows Server 2016 blocks insecure RDP connections (https://support.microsoft.com/en-us/help/4295591/credssp-encryption-oracle-remediation-error-when-to-rdp-to-azure-vm).
Since RDP uses CredSSP you have to install the current Windows Patches.
Do you can ping the DNS server by IP address from your VM?
Is ICMP (ICMP = the thing you need for ping) on your host enabled?
Here is a Checklist for ICMP:
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc749323(v=ws.10)
Solved,
Just switched to another physical computer and it was fine.
I have a computer connected to my workplace AD domain where through this connection it has access to the internet and also can connect to a server located on that domain e.g 150.130.xxx.xxx. I wonder how I can keep the connection to the server whilst disabling internet connection so that this computer can connect to the server but not the internet. Any advice?
I found a way by changing the IP settings from "obtain an IP address automatically" to "use the following IP address" and giving it the actual IP address of my machine, then leaving the default gateway and preferred DNS server empty.
Another solution is to simply do route -f in cmd after you've connected to the network. This will prevent internet traffic from being sent to your router. This might be a little simpler than what youre doing - it essentially does the same thing, but all in one convienent little command.
On my computer I have deployed my web site on IIS. If I access this website locally with :8080 works perfect, but when I try to access this site from another machine or my Android phone I get 'The site can't be reached. my_ip_address took too long to respond ERR_CONNECTION_TIMED_OUT –' this error.
I have tried solutions from this question, but nothing worked for me. Need some help!
There are few factors which can affect the accessibility of the site hosted on your local computer:
Is the client machine (including your phone) in the same network as the Server (In this case your site)
Is the firewall configured to allow connections on port 8080
Have you tried accessing the server using the IP Address. For e.g. http://192.168.0.1:port
Steps to isolate
Ping the server Ip from the client machine and see if it is able to connect to it.
ping 192.168.0.1
If the above fails, then I would assume that you are not on the same network. If it succeeds then check if the port is open.
You can also use nmap to see whether the ports are open or not
nmap -p 8080 kaushal.com
If the above fails, then open the port in your Firewall configuration and then try again.
Try this and share the results.
Trying to connect to localhost on my development machine with my iPad using wifi.
The webserver integrated in Visual studio.
Using ip number I get from ipconfig.
192.168.1.84:1144
I'm receiving http 400 error.
I've added port 1144 as TCP/IP port on firewall.
Anybody knows what I'm doing wrong?
does your machine have a static IP? with DHCP enabled, the ip of your machine keeps changing every now and then, so it might be the case that the address provided is no longer available!!
disconnect and reconnect to your network, then run ipconfig again and check if the IP has changed, if it has, then DHCP is enabled...
I can't access remotely my postgre database. My fellow is making a QT project that access the database from my web-server. It's very close to the problem from this guy: Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432?
And with some research in google, all solutions point to set the listen_addresses property in postgresql.conf like this:
listen_addresses = '*'
and in pg_hba.conf add this line in the IPV4 connections
host all all 0.0.0.0/0 trust
I've already done it, and also have created an exception in ufw
5432/tcp ALLOW x.x.x.x.x
when x.x.x.x is the ip I want to give access.
I've also tried some variants to the configuration above ,like
listen_addresses = 'localhost, x.x.x.x'
and
host all all x.x.x.x/32 md5
The error message of the linked question happens only when trying to connect locally. That's what ...running on host localhost... means.
When connecting to a remote host, the client doesn't set localhost in the host field, but the IP address or name of the remote machine (well, unless using a SSH tunnel but it's not mentioned here).
Otherwise please indicate the exact connection parameters of the client and the exact error message.