connecting vertica on AWS using php

I have been able to connect to my local vertica instance using php leveraging UNIX ODBC pacakge. I used a code similar to this one.

 

<?php
$dbName = 'your-database-name';
$hostname = 'your-hostname.com;
$account = 'your-username';
$password = 'your-password';
$driver = 'Vertica';

$dsn = 'Driver='.$driver.';Server='.$hostname.';Database='.$dbName;
$pdo = new PDO('odbc:'.$dsn, $account, $password);
var_export($pdo);
?>

 

Now I have moved my vertica database to the AWS. How do I connect to the vertica localed in AWS using php? What password shall I use since AWS EC2 does not allow vertica install with password.

 

Can anyone please share some example ?

 

Comments

  • I am also moving to AWS from DO. The PHP website is on DO right now, but in proceess of moving. I have already setup AWS PHP server, now I only need to know how to movie vertica to AWS.

  • edited May 20

    hello everyone,
    i have been able to connect to my local vertica instance using php leveraging UNIX OBDC package. I also used a code similar to this one. can also visit this site https://www.futuresolarwa.com.au/4kw-solar-power-system/

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.