Remote Connection to DBA MYSQL + PHP

0

Hello, I'm trying to make a test connection to a server called *

  

infinityfree

I'm using php with PDO. Call to connect.

 <?php 


try {
    $connex = new PDO("mysql:host=sql206.epizy.com;dbname=epiz_21864346_controle_estoque","epiz_21864346","kuNg2kQjR8XR");
      $connex->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  } catch(PDOException $e) {
      echo 'ERROR: ' . $e->getMessage();
  }

Detail of the server I'm using

Errorthatisreturningme

Can anyone help me?

    
asked by anonymous 30.03.2018 / 16:15

1 answer

0

You need to add your IP to the list of remote authorized to connect to this database.

If the control panel is cPanel it's in this icon:

    
06.04.2018 / 16:47