Skip to content
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

[Bug]: You will not be able to install anymore once you fill an incorrect database user/password in the installation form. #34121

Closed
6 of 9 tasks
zybersup opened this issue Sep 17, 2022 · 5 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug

Comments

@zybersup
Copy link

zybersup commented Sep 17, 2022

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • Nextcloud Server is running on 64bit capable CPU, PHP and OS.
  • I agree to follow Nextcloud's Code of Conduct.

Bug description

Using web installation script, setup-nextcloud.php, on my VPS (DirectAdmin, CentOS 7.2, Apache 2.4, PHP 7.4) I found that after I filled in the incorrect database user/password at the first time and the script return that "MySQL username and/or password not valid. You need to enter details of an existing account.", then I will not be able to finish it anymore no matter you use the correct user/password at the later times.

Soon later, still not finished installtion, I found that in the config.php, there will be a new random password everytime I submit the form no matter what password I filled in. It seems the installtion script will always generate the new random one. Surely the generated one will never be the correct one that I created at the database server. So I will never pass this step anymore after I did it wrong at the first time.

I do not have time to find the bug myself, so I restart all my process again and this time with correct db password at the first time. Then everything is fine.

Additionally I found that when I filled in the port number in the hostname field (formatted 'hostname:port'), it will be saved in the field 'dhhost' in config.php with the same format. However in the config.php, there is another field 'dbport' separated from the 'dbhost'. I am curious should the script split them off at put it into the right variable in the config.php rather?

Steps to reproduce

  1. First time at the create user and set up database information, fill in the database info with the wrong information of [db user, db password, or db name] so it will be unable to connect to the database.
  2. Error message "MySQL username and/or password not valid. You need to enter details of an existing account." returned.
  3. Try the correct database information
  4. You will never be able to finish installation anymore.

Expected behavior

The correct user/password should not return any error. It should lead to the finish of installation.

Installation method

Community Web installer on a VPS or web space

Operating system

RHEL/CentOS

PHP engine version

PHP 7.4

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

No response

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

No response

List of activated Apps

The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see https://www.php.net/manual/en/book.pcntl.php
Additionally the function 'pcntl_signal' and 'pcntl_signal_dispatch' need to be enabled in your php.ini.
Enabled:
  - accessibility: 1.10.0
  - activity: 2.16.0
  - bruteforcesettings: 2.4.0
  - circles: 24.0.1
  - cloud_federation_api: 1.7.0
  - comments: 1.14.0
  - contactsinteraction: 1.5.0
  - dashboard: 7.4.0
  - dav: 1.22.0
  - federatedfilesharing: 1.14.0
  - federation: 1.14.0
  - files: 1.19.0
  - files_pdfviewer: 2.5.0
  - files_rightclick: 1.3.0
  - files_sharing: 1.16.2
  - files_trashbin: 1.14.0
  - files_versions: 1.17.0
  - files_videoplayer: 1.13.0
  - firstrunwizard: 2.13.0
  - logreader: 2.9.0
  - lookup_server_connector: 1.12.0
  - nextcloud_announcements: 1.13.0
  - notifications: 2.12.1
  - oauth2: 1.12.0
  - password_policy: 1.14.0
  - photos: 1.6.0
  - privacy: 1.8.0
  - provisioning_api: 1.14.0
  - recommendations: 1.3.0
  - richdocuments: 6.2.0
  - serverinfo: 1.14.0
  - settings: 1.6.0
  - sharebymail: 1.14.0
  - support: 1.7.0
  - survey_client: 1.12.0
  - systemtags: 1.14.0
  - text: 3.5.1
  - theming: 1.15.0
  - twofactor_backupcodes: 1.13.0
  - updatenotification: 1.14.0
  - user_status: 1.4.0
  - viewer: 1.8.0
  - weather_status: 1.4.0
  - workflowengine: 2.6.0
Disabled:
  - admin_audit
  - encryption
  - files_external
  - user_ldap

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

@zybersup zybersup added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Sep 17, 2022
@PikaFan123
Copy link

PikaFan123 commented Sep 18, 2022

i was experiencing this issue as well and was able to resolve it by deleting the relevant lines from the /etc/webapps/nextcloud/config/config.php (which is where the config is stored in the archlinux package) file

@zybersup
Copy link
Author

Thanks, @PikaFan123.

I also found out later that I could just delete the config.php file then refresh the installation page again.

@w108x
Copy link

w108x commented Dec 20, 2022

holy moly, just spent 2 hours with the error "MySQL username and/or password not valid" and deleting config.php solved this issue, thank you!

@szaimen
Copy link
Contributor

szaimen commented Jan 23, 2023

You will not be able to install anymore once you fill an incorrect database user/password in the installation form.

I think this is expected and not a bug.

@szaimen szaimen closed this as completed Jan 23, 2023
@JL102
Copy link
Contributor

JL102 commented Aug 3, 2023

The current version (straight from GH source) of nextcloud seems to not save config.php properly. Even after deleting it and re running the install button, it seems to just pick a predetermined database user (oc_admin7) and a randomly generated password. I had to manually edit config.php to have the correct database user/password in order for the install process to set up correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug
Projects
None yet
Development

No branches or pull requests

5 participants