error trying to connect to cleardb - heroku

Hi again i want to connect to cleardb instance in heroku i take hostname and credentials from heroku config vars in CLEAR_DATABASE_URL but i am getting the following error
ERROR 2003 (HY000): Can't connect to MySQL server on 'us-cdbr-east-06.cleardb.net' (111)
im trying to connect in this way
mysql -u username -p -h us-cdbr-east-06.cleardb.net
any idea why i am getting 111 error?
thanks for your time

Error fixed thanks the help from cleardb support team, here support answer
Hi there,
Thanks for reaching out. You may want to check with your local network
administrator and/or ISP to ensure that you are allowed to access
remote resources that run on TCP 3306. It is possible that this port
has been blocked from your local network and/or machine. To be clear,
we performed a connection test on this database and found that it is
operating normally, so the next diagnostic step is to check your local
connectivity to remote MySQL databases.
Hope this helps,
member team

Related

What is the cause of this problem "IO Error: The Network Adapter could not establish the connection" on Sql Developer?

I make a connection for connect to the Database Server (other machine).
Then I found "An error was encountered performing the requested operation:
IO Error: The Network Adapter could not establish the connection
Vendor code 17002".
Please look the picture in URL below.
I tried to make a connection but can't access but my team can access it.
My friend used TNS connection type and I did everthing similar him but can't access. I tried to use JDBC thin for connect but can't also.
I had the old connection which I can connect but why I can't connect the new connection.
You're trying to connect to a machine on a network that SQL Developer is unable to reach.
For a TNS connection,
Look at the appropriate TNSNames entry (you will have a tnsnames.ora) file, and find the IP address or network name associated with the connection you're trying to establish -
And then start by trying to ping that resource.
In this case, i'm trying to talk to a database on MY machine, on port 1521. Yours should look quite different.
If you're using a basic connection, then you can look at the connection properties and see what machine/port you're trying to communicate with.
Ping
If you can't reach that machine from your machine, there's zero chance you can connect to a database there.
So, always start with a ping.
Once you see that you can get to that machine, if you're still getting that message, the next thing to think about is blocked ports, the listener defaults to port 1521, but you'll see that in the TNS descriptor as well.
It usually happens when a another process is running on the same port or there is an absence of listener.
Go to Run>services.msc>OracleXETNSListener>Start
Try to reconnect.. Even if the error still prevail then go to cmd
Use code:
npx kill-port <portnumber>
The port number by default is 1521, but you can check the port number in database properties.
It is possible, that your connection is forbidden by the firewall -
go to Control Panel\System and Security\Windows Defender Firewall - Advanced - Outbound Rules - Add a rule. (If you have some antivirus firewall, add rules there)
Create a temporary TCP rule for your port and another rule for UDP. Allow all nets and comps.
Check the telnet connection as cmd -> telnet ->
open remote.host.address PortNumber
If you can connect now, then the problem IS in firewall - edit your new rules, setting the hosts and nets exactly.
This error is because your sqldeveloper is not able to reach the database server's sql service.
One reason could be lsnrctl is down for some reason.
If you have access to machine where database is installed.
In Windows machine, follow: https://www.youtube.com/watch?v=r9pHqOfV2f0&ab_channel=TLinaTutorials
In Linux/macOS machine: Go to $ORACLE_HOME/bin and check status of lsnrctl
execute from $ORACLE_HOME/bin lsnrctl status, if it's down. Then restart it by lsnrctl start.
Check the details of connection in command output like SID, PORT, HOST etc. and try connecting again from sqldeveloper.

Connect local Laravel environment to Google Cloud SQL - MySQL

I try to connect my Laravel project into my local development environment to Google Cloud SQL (MySQL).
For this, I connected from my OSX Terminal with the Cloud SQL-Proxyclient to the remote database with port 3307.
I can connect with my MySQL Workbench to the remote database, and I can see/change tables, ...
Into my Laravel project into .env I changed the settings:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3307
DB_DATABASE=mydatabasename
DB_USERNAME=mydatabaseusername
DB_PASSWORD=mydatabasepassword
When I open my project into the browser, into terminal I can't see, that something tries to use the connection.
Into the browser I get an error message:
SQLSTATE[HY000] [2002] No such file or directory (2002)
I think, the project can't connect to the remote database
How can I solve this problem?
Thanks for help!
While the Cloud SQL Proxy connects to your database on port 3307, you want to connect to the Cloud SQL proxy on port 3306 (this is the default mysql port). You can also specify a custom port by updating the instances argument:
./cloud_sql_proxy -instances=my-project:us-central1:sql-inst=tcp:3306 &
I added now the public IP address of the server, and I added my local IP address to allowed IP adresses for the MySQL server. Now it works.
Make sure you have config for right DB_HOST. Let get an IPv4 Read this for more informations:
https://cloud.google.com/sql/docs/mysql/connect-external-app#appaccessIP

Local Oracle Client unable to ping/connect to AWS RDS

I have launched an AWS RDS with Oracle 11g (on port 1521).
Tried to connect using Oracle SQL developer. While testing the connection, getting the following error..
Error:
Status : Failure -Test failed: IO Error: An existing connection was forcibly closed by the remote host, connect lapse 0 ms., Authentication lapse 0 ms.
Explored various options and even opened up the windows outbound port from my local laptop to 1521 port. Nothing helped so far a week.
Found a solution..
Just launched another windows instance in AWS and modified security groups to make it secure access.
Security Group changes:
Opened the 1521 port of AWS RDS Oracle to the new windows instance
alone
Windows instance is restricted to only from office public IP.
This does not solve the real problem. However, this solves my purpose..
Thank you all..

Amazon EC2 Instance connectivity

I have created an ec2 instance and followed all steps according to AWS documentation, But I am unable to connect to database from the php files in html folder. Below is the error
Warning: mysqli_connect(): (HY000/1130): Host
'ip-172-31-28-115.us-west-2.compute.internal' is not allowed to
connect to this MySQL server in /var/www/html/test/test.php on line 11
Unable to connect to MySQL
The Php files are not getting connected to the database that is created on instance.
Note: I also tried creating new user and granted privileges to the new user but no luck!
It would be great if you can assist us through problem, since we have already spent lot of time experimenting on this.
Things to check for MySQL connection:
--/etc/my.cnf to ensure that listening on the right port(s) ip(s). 3306 default.
--Open port 3306 in AWS to ensure that client can access
--Grant privs on database to user that is connecting.
--Examine mysql logs and apache error logs for errors.
can you try running this? I think it has to do with permissions.
GRANT ALL PRIVILEGES ON . TO 'root'#'%';
FLUSH PRIVILEGES;

SOA suite with Remote DB server

I have the Oracle client, weblogic and the SOA suite 11g installed on a Win 7 machine. The Oracle DB is on a server 2008.
I have the hardest time connecting to it. The server name is S2008 on port 1521. I used the RCU to install the schema.
I am able to ping the server. Could someone please help me out in getting this connected? I have not done this configuration before.
Thank you.
This is more of a database concern, not WebLogic.
The simplest thing to do is to confirm you can telnet to port 1521 from the WebLogicmachine (telnet 1521). If this cannot connect, it is either a firewall issue or the TNS listener is not running on port 1521. Check to make sure that port 1521 is opened on the Database host and then try again.
Also, try connecting outside of WebLogic to remove a variable from the problem. This would be easier/faster anyway. Try using SQL developer to connect to the host/port where the database is running. This will show you the ORA-????? error(s) for the connection attempts without having to go through the connection wizard in the weblogic console

Resources