-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[4.0] Could not connect to database during installation #22956
Comments
It occurred to me to try installing Joomla 3.9 using the same database name and privileged user to see if the Joomla Joomla 4.0 Alpha 5 installation problem was with my hosting environment. The Joomla 3.9 install was a success, so it looks like the problem is with the Joomla 4.0 Alpha 5 nightly build I downloaded (Wednesday, 07 November 2018 03:00:34 UTC). I have noticed a lot of posts talking about installing Joomla 4.0 locally. However, I assume developers and testers are also installing it on web hosting environments? |
This comment was marked as abuse.
This comment was marked as abuse.
Thanks, @PhilETaylor. I can't explain why the Joomla 4 install didn't work for me yesterday, while Joomla 3.9 did today. I wanted the install for a Joomla 4 features dem at the Sydney JUG next Tuesday. The convenor, @tuum, was successful in installing Joomla 4.0 Alpha 5 on his test server, so I'm going to use his environment for the features dem. I'll come back and try again in my environment after next week. |
This comment was marked as abuse.
This comment was marked as abuse.
Hi @PhilETaylor, apologies for the delay in responding, no I wasn't using a PHP Dev Server, I simply updated the Joomla 4 package (unzipped) via FTP to a staging environment (folder) on my shared hosting server. Having succeeded in installing Joomla 3.9, I intend to have another go at installing the Nightly Build of Joomla 4.0, but probably not until next week. Regards, Robertf |
This comment was marked as abuse.
This comment was marked as abuse.
Thanks for the follow-up, @PhilETaylor. I do understand the message, hence I tested installing Joomla 3.9 using the same database and user (and I did create the database before trying to install Joomla 4.0) and was able to do so successfully. I do intend testing a new Nightly Build of Joomla 4.0, later in the week. |
Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/22956 |
This can be reopened if still an issue. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22956. |
Steps to reproduce the issue
Downloaded Joomla 4.0 Alpha 5 from GitHub and uploaded code to staging/testing server. Ran installation and got the error described in #22945, where the install would not proceed past set-up dialog boxes.
Followed the suggestion in that post, downloaded the latest nightly build (Wednesday, 07 November 2018 03:00:34 UTC), uploaded the code and tried the installation again. This time I got the error described in #21578 because I had a dash in my database name.
I renamed the database without a dash, re-ran the installation and his time I got: "An error has occurred while processing your request. 0 Could not connect to database."
I have confirmed I'm using the correct database owner name and password.
Expected result
Successful Joomla 4 installation
Actual result
Detailed above.
FYI: The error log below suggests the routine is trying to "create a database". I have already done so, so the recommendation "The required database may need to be created separately before you can install Joomla" is not relevant for my scenario.
System information (as much as possible)
This is the information from the admistrator/logs/error.php immediately following the failed installation:
2018-11-07T06:16:44+00:00 CRITICAL XXX.XXX.XX.XXX error Uncaught Throwable of type RuntimeException thrown with message "An error occurred while trying to create the database stagingrocher.
The user may not have enough privileges to create a database. The required database may need to be created separately before you can install Joomla". Stack trace: #0 /home/robertfa/staging.rocher/installation/src/Model/ConfigurationModel.php(52): Joomla\CMS\Installation\Model\DatabaseModel->createDatabase(Object(stdClass))
#1 /home/robertfa/staging.rocher/installation/src/Controller/InstallationController.php(95): Joomla\CMS\Installation\Model\ConfigurationModel->setup(Object(stdClass))
#2 /home/robertfa/staging.rocher/libraries/src/MVC/Controller/BaseController.php(734): Joomla\CMS\Installation\Controller\InstallationController->config()
#3 /home/robertfa/staging.rocher/installation/src/Application/InstallationApplication.php(316): Joomla\CMS\MVC\Controller\BaseController->execute('config')
#4 /home/robertfa/staging.rocher/installation/src/Application/InstallationApplication.php(202): Joomla\CMS\Installation\Application\InstallationApplication->executeController()
#5 /home/robertfa/staging.rocher/installation/src/Application/InstallationApplication.php(231): Joomla\CMS\Installation\Application\InstallationApplication->dispatch()
#6 /home/robertfa/staging.rocher/installation/src/Application/InstallationApplication.php(246): Joomla\CMS\Installation\Application\InstallationApplication->doExecute()
#7 /home/robertfa/staging.rocher/installation/includes/app.php(65): Joomla\CMS\Installation\Application\InstallationApplication->execute()
#8 /home/robertfa/staging.rocher/installation/index.php(36): require_once('/home/robertfa/...')
#9 {main}
2018-11-07T06:16:44+00:00 CRITICAL XXX.XXX.XX.XXX error Uncaught Throwable of type Joomla\Database\Exception\ConnectionFailureException thrown with message "Could not connect to database.". Stack trace: #0 /home/robertfa/staging.rocher/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php(229): Joomla\Database\Mysqli\MysqliDriver->select('stagingrocher')
#1 /home/robertfa/staging.rocher/libraries/vendor/joomla/session/src/Handler/DatabaseHandler.php(224): Joomla\Database\Mysqli\MysqliDriver->connect()
#2 [internal function]: Joomla\Session\Handler\DatabaseHandler->open('/opt/alt/php72/...', '153724148e3fcfe...')
#3 /home/robertfa/staging.rocher/libraries/vendor/joomla/session/src/Storage/NativeStorage.php(483): session_start()
#4 /home/robertfa/staging.rocher/libraries/src/Session/Storage/JoomlaStorage.php(304): Joomla\Session\Storage\NativeStorage->start()
#5 /home/robertfa/staging.rocher/libraries/vendor/joomla/session/src/Session.php(448): Joomla\CMS\Session\Storage\JoomlaStorage->start()
#6 /home/robertfa/staging.rocher/libraries/vendor/joomla/session/src/Session.php(336): Joomla\Session\Session->start()
#7 /home/robertfa/staging.rocher/libraries/src/Session/Session.php(131): Joomla\Session\Session->get('setup.options', NULL)
#8 /home/robertfa/staging.rocher/installation/src/Application/InstallationApplication.php(439): Joomla\CMS\Session\Session->get('setup.options')
#9 /home/robertfa/staging.rocher/installation/src/Application/InstallationApplication.php(228): Joomla\CMS\Installation\Application\InstallationApplication->initialiseApp()
#10 /home/robertfa/staging.rocher/installation/src/Application/InstallationApplication.php(246): Joomla\CMS\Installation\Application\InstallationApplication->doExecute()
#11 /home/robertfa/staging.rocher/installation/includes/app.php(65): Joomla\CMS\Installation\Application\InstallationApplication->execute()
#12 /home/robertfa/staging.rocher/installation/index.php(36): require_once('/home/robertfa/...')
#13 {main}
Additional comments
The text was updated successfully, but these errors were encountered: