Jump to content

Recommended Posts

Posted

I need to connect to remote server, please can firewall rules be changed.

username: anielfreire

- Remote server

host: mysql-370618eb-anielfreire-50a6.b.aivencloud.com

ping: 16.171.225.142

port: 23166

Posted

Krydos would need to open this.

In the meantime, is it possible to have the remote end reconfigured to be accessible over a port that’s already open like 3306?

Posted
26 minutes ago, wolstech said:

Krydos would need to open this.

In the meantime, is it possible to have the remote end reconfigured to be accessible over a port that’s already open like 3306?

I can't change the port. I had to change the server so this is the new host:

host: mysql-22e2c828-anielfreire-50a6.e.aivencloud.com

ping: 13.48.128.124

port: 23166

  • Krydos changed the title to [Solved] Firewall configuration
Posted

It's not working yet. This is what I'm trying to do:

https://afreire.helioho.st/index.php

<?php

$uri = "mysql://avnadmin:notpassword@mysql-22e2c828-anielfreire-50a6.e.aivencloud.com:23166/defaultdb?ssl-mode=REQUIRED";

$fields = parse_url($uri);

// build the DSN including SSL settings
$conn = "mysql:";
$conn .= "host=" . $fields["host"];
$conn .= ";port=" . $fields["port"];
$conn .= ";dbname=defaultdb";
$conn .= ";sslmode=verify-ca;sslrootcert=/home/afreire.helioho.st/ca.pem";

try {
  $db = new PDO($conn, $fields["user"], $fields["pass"]);
  echo "Connected successfully";
  $stmt = $db->query("SELECT VERSION()");
  print($stmt->fetch()[0]);
  var_dump($db->query("SHOW STATUS LIKE 'Ssl_cipher';")->fetchAll());
} catch (Exception $e) {
  echo "Error: " . $e->getMessage();
  echo "Stack Trace:<br>" . nl2br($e->getTraceAsString());
}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...