-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mysql port syntax in config #15560
Comments
There is no configuration value like
This is desired and documented behaviour and not a bug in my opinion. EDIT: this was already the case in the stable9 branch of the documentation: |
https://github.com/nextcloud/server/search?q=dbport&unscoped_q=dbport The nextcloud install wizard will create configure file, contains the dbport config section. |
Fair enough ;) @nextcloud/server-triage Remove |
good find @netroby |
I guess I don't get it fully. The port is written back to the config file, but this should not cause problems. Also the port is used and only if not filled then it uses the part from the host config: server/lib/private/Setup/AbstractDatabase.php Lines 120 to 135 in 0eebff1
|
Is this code exclusively used when installing Nextcloud? |
@BernieO i think so ;) server/lib/private/DB/ConnectionFactory.php Line 188 in 0ee191b
Usually the connection factory is used to create the db connection. |
|
Somewhat related: Examples: This doesn't work, but should (assuming specifying the port in 'dbhost' => '[2001:DB8::1:2]:5432',
'dbport' => '', This doesn't work, but should: 'dbhost' => '[2001:DB8::1:2]',
'dbport' => '5432', This doesn't work, and maybe should: 'dbhost' => '2001:DB8::1:2',
'dbport' => '5432', This works (in my case), but is very susceptible to errors. It assumes the part after the last server/lib/private/DB/ConnectionFactory.php Lines 237 to 254 in 0ee191b
Which is fatal if it isn't specified to make use of the default values: 'dbhost' => '2001:DB8::1:2:5432',
'dbport' => '', The DB From a first look it doesn't seem too hard to fix the code, however a proper fix might break backwards compatibility for the config.php, especially for IPv6 addresses. If you motivate me a little, I can try to do a PR. But prepare for some review work, it would be my first for Nextcloud. |
nextcloud-server:16.0.1
If the mysql server port not default 3306, then your config.php
dbport
not have effect.error log show us : refuse to connect mysql server
and the solution, is make the dbhost
ip:port
like
The text was updated successfully, but these errors were encountered: