# Cannot connect to remote mysql with error 500 "HY000"

**URL:** <https://community.dreamfactory.com/t/cannot-connect-to-remote-mysql-with-error-500-hy000/5059>\
**Category:** Connecting to SQL\
**Created:** [November 7, 2019, 10:19pm UTC](https://community.dreamfactory.com/t/cannot-connect-to-remote-mysql-with-error-500-hy000/5059 "2019-11-07T22:19:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_Dawson](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@Mike\_Dawson](https://community.dreamfactory.com/u/Mike_Dawson)\
**Post date:** [November 7, 2019, 10:19pm UTC](https://community.dreamfactory.com/t/cannot-connect-to-remote-mysql-with-error-500-hy000/5059/1 "2019-11-07T22:19:50Z")

</div>

See the error below, I have searched and cannot understand the issue. I am able to telnet into the database and have added the ip to the remote mysql table. Any help is appreciated.

{  
“error”: {  
“code”: “HY000”,  
“message”: “SQLSTATE[HY000]: General error: 1298 Unknown or incorrect time zone: ‘’ (SQL: SELECT DATABASE() FROM DUAL)”  
}  
}

---

<div class="post-metadata">

**Author:** ![abhishek.pandey](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@abhishek.pandey](https://community.dreamfactory.com/u/abhishek.pandey)\
**Post date:** [April 23, 2020, 6:54pm UTC](https://community.dreamfactory.com/t/cannot-connect-to-remote-mysql-with-error-500-hy000/5059/2 "2020-04-23T18:54:44Z")

</div>

Hey @Mike_Dawson. I know its kind of a late reply. But if the problem still persists, I think the problem here would be the SSL connection not being set in your PHP script. As you’ve set up SSL for MySQL you would also need to specify this in your PHP MySQL connection.

With `mysqli` you can use the `mysqli_ssl_set()` function. Below is an example:

```auto
<?php
$con=mysqli_init();
if (!$con)
  {
  die("mysqli_init failed");
  }

mysqli_ssl_set($con,"key.pem","cert.pem","cacert.pem",NULL,NULL);

if (!mysqli_real_connect($con,"localhost","my_user","my_password","my_db"))
  {
  die("Connect Error: " . mysqli_connect_error());
  }

// Some queries...

mysqli_close($con);
?>

```

Let me know if it helps.  
Thanks
