# Clarification about PHP mysql configuration

**URL:** <https://help.nextcloud.com/t/clarification-about-php-mysql-configuration/21807>\
**Category:** ℹ️ Support\
**Created:** [October 2, 2017, 10:26pm UTC](https://help.nextcloud.com/t/clarification-about-php-mysql-configuration/21807 "2017-10-02T22:26:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MichaIng](https://help.nextcloud.com/user_avatar/help.nextcloud.com/michaing/32/2125_2.png) [@MichaIng](https://help.nextcloud.com/u/MichaIng)\
**Post date:** [October 2, 2017, 10:26pm UTC](https://help.nextcloud.com/t/clarification-about-php-mysql-configuration/21807/1 "2017-10-02T22:26:42Z")

</div>

Hey there,

according to admin manual, the following php mysql module configuration could be used: [Database Configuration — Nextcloud 12 Server Administration Manual 12 documentation](https://docs.nextcloud.com/server/12/admin_manual/configuration_database/linux_database_configuration.html#configuring-a-mysql-or-mariadb-database)

> ```
> # configuration for PHP MySQL module
> extension=pdo_mysql.so
> 
> [mysql]
> mysql.allow_local_infile=On
> mysql.allow_persistent=On
> mysql.cache_size=2000
> mysql.max_persistent=-1
> mysql.max_links=-1
> mysql.default_port=
> mysql.default_socket=/var/lib/mysql/mysql.sock # Debian squeeze: /var/run/mysqld/mysqld.sock
> mysql.default_host=
> mysql.default_user=
> mysql.default_password=
> mysql.connect_timeout=60
> mysql.trace_mode=Off
> 
> ```

Is this something like a recommendation or an example to just show the available settings?  
As can be seen, some values are empty, others have just the default value ([PHP: Runtime Configuration - Manual](http://php.net/manual/en/mysql.configuration.php)) and explicitly the manual just gives the advice to ensure that `mysql.default_socket` points to the right socket location. This makes sense, although it is handled and usually set right within default `php.ini`.

Besides, I am not sure, that at least since PHP7.0 these config values change anything about the `pdo_mysql` extension used by Nextcloud. This has it’s own settings: [PHP: MySQL (PDO) - Manual](http://php.net/manual/en/ref.pdo-mysql.php#pdo-mysql.configuration)  
`pdo_mysql` further depends on `mysqlnd` with again brings its own settings: [PHP: Runtime Configuration - Manual](http://php.net/manual/en/mysqlnd.config.php)  
So I am a bid confused if the `mysql.<...>` settings do have any influence. They also do not show up on `phpinfo()`.

---

<div class="post-metadata">

**Author:** ![MichaIng](https://help.nextcloud.com/user_avatar/help.nextcloud.com/michaing/32/2125_2.png) [@MichaIng](https://help.nextcloud.com/u/MichaIng)\
**Post date:** [October 6, 2017, 8:50am UTC](https://help.nextcloud.com/t/clarification-about-php-mysql-configuration/21807/2 "2017-10-06T08:50:49Z")

</div>

> <https://github.com/nextcloud/documentation/issues/571>

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 2, 2024, 2:44pm UTC](https://help.nextcloud.com/t/clarification-about-php-mysql-configuration/21807/3 "2024-12-02T14:44:04Z")

</div>



---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 4, 2024, 1:59pm UTC](https://help.nextcloud.com/t/clarification-about-php-mysql-configuration/21807/4 "2024-12-04T13:59:30Z")

</div>


