J4 Issue ?
avatar tallandtrue
tallandtrue
7 Nov 2018

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

avatar tallandtrue tallandtrue - open - 7 Nov 2018
avatar joomla-cms-bot joomla-cms-bot - change - 7 Nov 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 7 Nov 2018
avatar tallandtrue tallandtrue - change - 7 Nov 2018
The description was changed
avatar tallandtrue tallandtrue - edited - 7 Nov 2018
avatar tallandtrue tallandtrue - change - 7 Nov 2018
Title
could not connect to database
[4.0] Could not connect to database during installation
avatar tallandtrue tallandtrue - edited - 7 Nov 2018
avatar brianteeman brianteeman - change - 7 Nov 2018
Labels Added: J4 Issue
avatar brianteeman brianteeman - labeled - 7 Nov 2018
avatar tallandtrue
tallandtrue - comment - 8 Nov 2018

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?

avatar PhilETaylor
PhilETaylor - comment - 8 Nov 2018

I am unable to replicate this after much testing with

commit 2a76a1d (HEAD -> 4.0-dev, origin/4.0-dev)

avatar tallandtrue
tallandtrue - comment - 8 Nov 2018

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.

avatar PhilETaylor
PhilETaylor - comment - 12 Nov 2018

were you using the PHP Development Server (command line like php -S 0.0.0.0:80) to run this site at that time ?

avatar tallandtrue
tallandtrue - comment - 15 Nov 2018

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

avatar PhilETaylor
PhilETaylor - comment - 15 Nov 2018

ok well the error message in your stack trace is

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

Which is quite clear, are you 100% sure the user you created for mysql has privaleges to create databases (normally this is NOT the case on cPanel and Plesk servers) In that case you need to create the database using your webhost control panel BEFORE attempting to install Joomla. This is perfectly normal.

avatar tallandtrue
tallandtrue - comment - 19 Nov 2018

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.

avatar joomla-cms-bot joomla-cms-bot - change - 8 Jan 2019
Status New Closed
Closed_Date 0000-00-00 00:00:00 2019-01-08 02:23:51
Closed_By joomla-cms-bot
avatar Quy Quy - change - 8 Jan 2019
Closed_By joomla-cms-bot Quy
avatar joomla-cms-bot joomla-cms-bot - close - 8 Jan 2019
avatar joomla-cms-bot
joomla-cms-bot - comment - 8 Jan 2019

Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/22956

avatar Quy
Quy - comment - 8 Jan 2019

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.

Add a Comment

Login with GitHub to post a comment