Func Mysqli Ssl Set
# PHP mysqli_ssl_set() Function
[ PHP MySQLi Reference Manual](#)
## Example
Create an SSL connection:
```php
* * *
## Definition and Usage
The `mysqli_ssl_set()` function is used to create an SSL secure connection. However, this function is only effective if OpenSSL support is enabled.
**Note:** This function must be called before [mysqli_real_connect()](#).
**Note:** In versions prior to PHP 5.3.3, MySQL Native Driver did not support SSL. Starting from PHP 5.3+, MySQL Native Driver is enabled by default on Microsoft Windows.
* * *
## Syntax
```php
mysqli_ssl_set(connection,key,cert,ca,capath,cipher);
| Parameter | Description |
| :--- | :--- |
| _connection_ | Required. Specifies the MySQL connection to use. |
| _key_ | Required. Specifies the path name to the key file. |
| _cert_ | Required. Specifies the path name to the certificate file. |
| _ca_ | Required. Specifies the path name to the certificate authority file. |
| _capath_ | Required. Specifies the path name to a directory that contains PEM format trusted SSL CA certificates. |
| _cipher_ | Required. Specifies a list of allowable ciphers for SSL encryption. |
## Technical Details
| Return Value: | Always returns TRUE. If SSL is not set up correctly, [mysqli_real_connect()](#) will return an error when you attempt to connect. |
| :--- |
| PHP Version: | 5+ |
* * PHP MySQLi Reference Manual](#)
YouTip