anielfreire Posted December 8 Posted December 8 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
wolstech Posted December 8 Posted December 8 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?
anielfreire Posted December 8 Author Posted December 8 I'll try that. Is it the blocking only because of the port or is it because it's an outgoing connection?
anielfreire Posted December 8 Author Posted December 8 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
anielfreire Posted December 9 Author Posted December 9 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()); }
Krydos Posted December 9 Posted December 9 1 hour ago, anielfreire said: It's not working yet. Ok, try it again now. 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now