Can´t connect external MySQL Database with PHP via MAMP/XAMPP from MACOS - macos

Really strange problem and i do not found working solution for hours.
My Desktop-Setup (WinPc, XAMPP, Win7) is working great.
My Laptop-Setup (MacBook, XAMPP, MacOs10.12) is not.
I try to connect to an external MySQL(i) Database from php.
I tried MAMP and XAMPP and always get the same solution.
Connecting to the local Database Server (localhost) via php is working fine.
If i try to connect to external mysql-database, webbrowser is freezing - after a while I get a TIME OUT.
Warning: mysqli::mysqli(): (HY000/2002): Operation timed out in
Fatal error: Failed to connecto to MySQLi: Operation timed out in
I guess the problem is somewhere at the mysql or the macOS, but i don't know where to search or what is blocking.
I can ping/telnet the remote host and i get answer.
The same script (same database login data) is working on the pc/windows machine.
There is no problem with the remote database server. I can connect from windows machine and also i can connect from mac with the database tool "db beaver". But I cant´t connect via php.
SOLUTION:
maybe the many installs from MAMP and XAMPP did anything to the osx. Reinstall from XAMPP and reboot did fix everything.

Related

How to access local postgreSQL server running on computer, from my mobile phone?

How to access local postgreSQL server running on computer, from mobile my phone?
I am making flutter app and use pgAdmin v6.10 as local server. I'm stuck for 2days trying different solutions to access server from my mobile browser but no progress.
I believe if i can access local server through mobile browser, also i can send data from my flutter app to database.
My pgAdmin runs on pc browser nicely but on phones browser doesn't open,
I've tried addresses 192.168.43.12:port(i.e computer's ip:port number) and 127.0.0.1:port
but they all didn't work, i get ERR_CONNECTION_REFUSED
Also i added this line on pg_hba.conf file
TYPE DATABASE USER ADDRESS METHOD
host flutterdb flutterdb_admin 192.168.43.12/24 scram-sha-256
And on my postgresql.conf file there is
listen_addresses = '*'
I'm following tutorial series from: https://youtu.be/WFe1kZhvUIw
I need your help please.
NOTE: I am using Windows laptop
i think that if u have dev environment, just you can try to open the connection..
you can try to configure for accept all connections
How to configure PostgreSQL to accept all incoming connections

Can't connect to freshly installed MongoDB

I'm rather new to MongoDB and installed it recently using the MongoDB community server (On my Windows clinet). I set the environment variable and started the database using mongod. Everything seemed fine and I can connect to the database using the GUI of Robo3T.
But if I try to connect to the DB using the mongo command in the Terminal I get the following Error:
Failed global initialization: InvalidSSLConfiguration CertCreateCertificateChainEngine failed: Falscher Parameter.
Seems like some SSL configuration failed, but I never touched anything in the configuration file of Mongo. What can I do to connect to my database in the terminal?
It turnes out, that I get that error no matter if I try to connect to the local DB or some other IP on another Server. So I'm pretty sure the error is not caused by my local mongodb server.
Thank you for your help
I completely stopped the mongo service, removed every single file I was able to find containing mongo information. Reboot my system and install mongo anew. That was the only way I was able to fix it, since just uninstalling and reinstalling didn't do the trick.

MySql Connectivity issue on wamp

I am USing Wamp server to make joomla project . I have completed the project and it was working fine but after a day i checked it so it wasnt opening and showing following error
.Error: Failed to start application: Could not connect to MySQL server.
It might have corrupted due to some reason. You can try once restarting the mysql service through wamp using stop and start.

remote oracle database connection

I am working on a project using oracle.The remote host pc ip address is 10.100.59.30 where my database exists.I want to connect the database from my computer(ip:10.100.59.150). How should I do it?Oracle listener is working fine.But Showing network adapter is not connecting.I checked the firewall.It is off.All is fine but database connection is not building up.I have tried every possible solution.Am I missing some silly things?I have tried with sqlplus username/password#hostA:1521 /XE in cmd.but not working.And I do not have oracle installed in my pc.
Do you have tnsnames.ora? Or here is AskTom answer how to connect to oracle without one.

Postgres ODBC: connection "actively refused"

I'm using SSH tunneling to connect from a Windows 7 machine to a remote Postgres database.
The tunnel works fine when I use pgAdmin to connect to the remote database. However, I haven't managed to set up an ODBC DSN to connect to the remote database.
I'm creating a System DSN with the same server address/username/password/port/ssl mode as pgAdmin but when I click "Test" I get: "Could not connect to server; No connection could be made because the target machine actively refused it."
Any ideas on where to start debugging? I've ruled out Windows Firewall and remote server configuration, since I can connect with the exact same information in pgAdmin.
Edit
The problem resolved itself after reinstalling Windows.
When debugging this the first thing to do is to start testing the PostgreSQL server with the psql command line utility. This avoids issues of drivers etc to see what is actually going on. Generally speaking my troubleshooting process is:
Can I ping the server?
Can I connect with psql?
When I test my connection via the control panel, does it work?
Now, assuming the problem is on #2, the first thing I would do is try disabling firewalls on both sides (they can be brought up and tuned after trying with both down). This rules out misbehaving firewalls and if it shows this to be a problem then you have the answer on where to troubleshoot.
In my experience Windows firewall can cause all manner of problems. I have even seen it block web pages halfway through the web page. I don't think you can rule out Windows Firewall based on the information you have provided.
If this happens again, the first things to do include disabling both any antivirus software and firewalls.
The other possibility would be a bad ODBC config (maybe port 5423 instead of 5432) or a badly installed DLL of some sort. The latter may be fixed (or not) using sfc /scannow or reinstalling the odbc driver, or other actions.

Resources