# OMEKA-S : SSL Connection erreur : An exception occurred in driver: SQLSTATE\[HY000\] \[1045\] Access denied for user

**URL:** https://discourse.laminas.dev/t/omeka-s-ssl-connection-erreur-an-exception-occurred-in-driver-sqlstate-hy000-1045-access-denied-for-user/2829
**Category:** Components & MVC
**Tags:** laminas-db
**Created:** [March 23, 2022, 8:41pm UTC](https://discourse.laminas.dev/t/omeka-s-ssl-connection-erreur-an-exception-occurred-in-driver-sqlstate-hy000-1045-access-denied-for-user/2829 "2022-03-23T20:41:42Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Linus\_11](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/linus_11/32/1279_2.png) [@Linus\_11](https://discourse.laminas.dev/u/Linus_11)
#### Post date: [March 23, 2022, 8:41pm UTC](https://discourse.laminas.dev/t/omeka-s-ssl-connection-erreur-an-exception-occurred-in-driver-sqlstate-hy000-1045-access-denied-for-user/2829/1 "2022-03-23T20:41:42Z")

</div>

Hello,  
I am looking to disable SSL to connect to my hosting with Omeka-s 3.1.2 and I would like to know how I can integrate “MYSQLI\_CLIENT\_SSL\_DONT\_VERIFY\_SERVER\_CERT” in the code using Mysqli, the file is in “omeka-s\vendor\laminas-db\src\Adapter\Driver\Mysqli” to install the cms.  
Php : 7.4.14  
Mysql : 8.0.28  
Omeka-s : 3.1.2  
error: “An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for user”.  
Thanks for your help.  
Linus\_11

---

<div class="post-metadata">

### Author: ![ocramius](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/ocramius/32/23_2.png) [@ocramius](https://discourse.laminas.dev/u/ocramius)
#### Post date: [March 24, 2022, 12:57am UTC](https://discourse.laminas.dev/t/omeka-s-ssl-connection-erreur-an-exception-occurred-in-driver-sqlstate-hy000-1045-access-denied-for-user/2829/2 "2022-03-24T00:57:38Z")

</div>

As the exception states, doesn’t seem like your problem is with certificates, but rather with credentials.

---

<div class="post-metadata">

### Author: ![Linus\_11](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/linus_11/32/1279_2.png) [@Linus\_11](https://discourse.laminas.dev/u/Linus_11)
#### Post date: [March 24, 2022, 8:56am UTC](https://discourse.laminas.dev/t/omeka-s-ssl-connection-erreur-an-exception-occurred-in-driver-sqlstate-hy000-1045-access-denied-for-user/2829/3 "2022-03-24T08:56:33Z")

</div>

Hello,  
Sorry for the confusion ! ☺😜

Thank you for your answer,

But why can I connect to the database (host, login, pass, user) and retrieve data from my table with a simple php script?

```auto
$conn = mysqli_init();
	$conn->options(MYSQLI_OPT_SSL_VERIFY_SERVER_CERT, false);
	mysqli_ssl_set($conn, , , ,);

	$conn->real_connect('$hostname', $username, password,$dbname,$port,'MYSQLI_CLIENT_SSL');

```

I know that with Omeka classic you can force SSL verification, on Omeka  
with a code like this

```auto
// in "application/libraries/Zend/Db/Adapter/Mysqli.php" add MYSQLI_CLIENT_SSL.."
 $_isConnected = @mysqli_real_connect(
            $this->_connection,
            $this->_config['host'],
            $this->_config['username'],
            $this->_config['password'],
            $this->_config['dbname'],
            $port,
            $socket,
            MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT
        );
// option 'flags' to be replaced by "MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT" 

```

I don’t know where to configure this parameter on Omeka-S

Maybe I should use PDO instead of Mysqli ? and configure it?

Linus.

---

<div class="post-metadata">

### Author: ![ocramius](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/ocramius/32/23_2.png) [@ocramius](https://discourse.laminas.dev/u/ocramius)
#### Post date: [March 24, 2022, 9:49am UTC](https://discourse.laminas.dev/t/omeka-s-ssl-connection-erreur-an-exception-occurred-in-driver-sqlstate-hy000-1045-access-denied-for-user/2829/4 "2022-03-24T09:49:36Z")

</div>

I have no idea what this is about at this point, but please switch to English 😁

---

<div class="post-metadata">

### Author: ![Linus\_11](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/linus_11/32/1279_2.png) [@Linus\_11](https://discourse.laminas.dev/u/Linus_11)
#### Post date: [March 24, 2022, 10:58am UTC](https://discourse.laminas.dev/t/omeka-s-ssl-connection-erreur-an-exception-occurred-in-driver-sqlstate-hy000-1045-access-denied-for-user/2829/5 "2022-03-24T10:58:25Z")

</div>

I hope my comment is more readable / understandable above… 😇 ⬆
