I'm trying to connect via SSH using PDO MySQL. With my shared bluehost account I connected via my SSH login username, pass and connect to the db box but I have a VPS with godaddy. I'm wondering how do I connect remotely to my db using SSH.
self::$instance = new PDO("mysql:host=126.96.36.199;port=2083;dbname=db_name", 'username', 'password');
To connect via the web browser to my PHPMyAdmin I connect via:
That's my url for my cPanel for this domain.
I have a connection via SSH and the connection is remote through my MySQL IDE but I don't know how to do this using PDO.
For some reason I cannot do a regular connection like
self::$instance = new PDO("mysql:host=emailmarketingservicesco.com;dbname=db_name", 'username', 'password'');
I tried using doing a regular connection (i.e. non SSH) via my MySQL IDE and it cannot connect either. So I can't test the PDO via a regular connection (for now anyway).
The Remote MySQL IP has been whitelisted via cPanel already. It's a VPS host so I'm thinking perhaps there needs to be some additional setting in WHM but I'm not certain.