Repository navigation
Clarification about PHP mysql configuration #571
Description
Activity
- added a commit that references this issue
on Oct 30, 2017 Is this something like a recommendation or an example to just show the available settings?
This looks for me like the default debian settings. In debian, these options are already configured so no manual interaction is required. This could be different in other distributions, and it is mostly something to check if you have problems with your database connection.
For database performance, it is much more interesting to optimize the cache settings of mysql itself.What changes to the documentation would you suggest @MichaIng ?
@tflidd
Thanks for reply.Yes, finally I also got that this can just be a list of available options+defaults and can/need to be ignored on usual installations. It is just not too clear for me, reading it.
What changes to the documentation would you suggest
Generally I would suggest only the usually required/recommended settings to be there, with links to further information, if needed. So the average user can simply follow the provided steps, without stumbling over several additional information, where (s)he doesn't know, if they matter, should be applied or can/should be ignored.
I just refer to nextcloud/server#6449, where I guess most inexperienced user, including me for longer time, just usedSatisfy Anywithin their apache nextcloud.conf, just in case, and opened their data folder (if inside nextcloud installation folder) to the web by this. I remember, that I saw the warning an admin manual, an was damn not able to figure out, what is wrong, as all.htaccesssettings were right in place, running etc. Finally I moved my data folder outside, which is a good idea anyway. And just because it is still not yet made clear in admin manual, that you SHOULD ignore this and JUST if anything is not running and you know, that you use parent folder authentication AND you know, that your data folder is placed outside of nextcloud ones. But this is another story...In this case:
- First refer to command line installation, as it automates all user+database creation + config.php entries: https://docs.nextcloud.com/server/12/admin_manual/installation/command_line_installation.html
- Second (if occ installation is not used) I would go on with
To start the MySQL command line mode use:part. - Then just as troubleshooting if after upper steps, Nextcloud wont open/show database access error: Check for
pdo_mysql, which can be usually done viaphp -m. - The path to module settings should be corrected and made clear, that this highly depends on distro and PHP version: On current Debian/Raspbian with PHP7.0 it's e.g.
/etc/php/7.0/mods-available/pdo_mysql.ini - Instead of giving the example file here, which could lead to confusion as stated, just give links to the PHP manual on how to specifically configure it, if needed. I am still not sure, if pdo_mysql itself actually can only be configured like this: http://php.net/manual/en/ref.pdo-mysql.php#pdo-mysql.configuration or if the default mysql runtime settings also apply there (maybe for all connectors?): http://php.net/manual/en/mysql.configuration.php
Butmysql.cache_sizee.g. does not show up anywhere, is maybe from ancient versions or something. - As the database configuration is not really mentioned within the "Installation on Linux" page, I would link it from there, e.g. within this part, where MySQL/MariaDB is already mentioned: https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html#example-installation-on-ubuntu-16-04-lts-server
If you think, most will agree, I could make a PR.
I think a step-by-step guide is missing. We have a couple of guides which people created on their blogs and partly shared via help.nextcloud.com. I would prefer to keep a current one in the docs, or link to one which is kept up to date (ref: https://help.nextcloud.com/t/tutorial-sync-nextcloud-tasks-calendars-and-contacts-on-your-android-device/25249)
Regarding the database setup, I think it is ok to try to set up the database via occ command and your approach looks good.
@tflidd
Yes, I mean it is hard to create a step-by-step guide that is valid for really every setup. All the user guides of course suit to their os (+version), database and webserver preference, which is totally okay. They are still of high value.
As the admin manual is to be for every kind of users with different needs/preferences, it is not possible to make it really step-by-step. There always need to be the different sections for different webservers, databases etc. e.g. here the database page separated into MySQL/MariaDB and PostgreSQL. Or the "Server Configuration" where everyone needs to see, what (s)he needs.
There would be some kind of selection system necessary, which, based on user input, matches the right parts of the manual together to follow step-by-step 😆.But the single sections should be as clean and easy to follow as possible, with just the adjustments/settings that are really necessary and as said just links to any further possible configurations. I already asked at some other place for something similar at the redis socket section: https://docs.nextcloud.com/server/12/admin_manual/configuration_server/caching_configuration.html#id3
Besides the necessary two values, also the three 'dbindex', 'password' and 'timeout' are given inside the "example". Okay, beneath it is written, that these are just optional, but I personally would, to keep it clean and easy to follow/copy&paste, just give the minimum, which will fit for 90% of users, and then give a link to the "config.php parameters" section, where the other 3 parameters are explained.
What is missing on the other hand is, the changes you need to make toredis.confand allowing www-data access to the socket. A newbie, who is reading this and want's to use Redis via unix socket, as it "is recommended if Redis is running on the same system as Nextcloud" and then accordingly adjusts config.php, will not even directly know, that something is not working, until (s)he recognizes the log entries, about non-reachable redis server and end up on google/help.nextcloud.com 😉.The Ubuntu example installation of course is closer to a real step-by-step guide. But as said, database setup should be linked from there and the whole highly recommended SSL party, where I would for every home server newby clearly add certbot installation, also for simplicity, as it automates also webserver configuration.
Is this still relevant?
@kesselb
I will close this issue. I don't find the time currently to do larger documentation commits/PRs, but I have it in mind, if this changes.
Related to: https://help.nextcloud.com/t/clarification-about-php-mysql-configuration/21807
Hey there,
according to admin manual, the following php mysql module configuration could be used: https://docs.nextcloud.com/server/12/admin_manual/configuration_database/linux_database_configuration.html#configuring-a-mysql-or-mariadb-database
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 or dont even exist on php manual (http://php.net/manual/en/mysql.configuration.php)
and explicitly the manual just gives the advice to ensure that
mysql.default_socketpoints to the right socket location. This makes sense, although it is handled and usually set right within defaultphp.ini.Besides, I am not sure, that at least since PHP7.0 these config values change anything about the
pdo_mysqlextension used by Nextcloud. This has it's own settings: http://php.net/manual/en/ref.pdo-mysql.php#pdo-mysql.configurationpdo_mysqlfurther depends onmysqlndwith again brings its own settings: http://php.net/manual/en/mysqlnd.config.phpSo I am a bid confused if the
mysql.<...>settings do have any influence. They also do not show up onphpinfo().I use PHP7.0 with MariaDB 10.1 on Raspbian Stretch.