Start installation of joomla.
Don't change the default suggested databasename.
Fill out the rest correctly.
The installer gives you an error that your database user do not have enough permisions to create database.
You change the database name and resubmit.
Gives you "0 A Database error occurred."
Cannot install joomla.
Please see video: https://www.dropbox.com/s/nwwwinv9703yvr1/joomla-instalation-error.mp4?dl=0
Be able to change database name and finish installation
Not able to finish installation
Newest joomla 4 beta version downloaded today.
PHP 7.3
Labels |
Added:
?
|
Looking at the attached video. Why is Joomla! even attempting to create a database?
Status | New | ⇒ | Information Required |
You first have to install a database, did you install the database "joomla_db". And can access it via phpMyAdmin, also if it is empty?
My hosting panels all require database names to have a certain structure, so I never can use the default name on servers.
Looking at the attached video. Why is Joomla! even attempting to create a database?
It does this by design - some people think its a convenient feature. I did try to remove that in the past but that was rejected
It is a nice feature. I like it when working local. What about adding an information to the install screen that the database must be installed and accessible on the server?
I did try to remove that in the past but that was rejected
Pity. I would have supported removal.
i'm unable to replicate this behaviour on PDO postgresql, where my user don't have the GRANT to create a new database, after setting the correct available database under my user the installation goes successfully to end
p.s
even if i can agree in some way that on localhost can be maybe handy, in the wild, it is quite rare that your user have the GRANT to create a new database
can someone replicate the issue under a mysql db ?
@brianteeman @alikon means the 2nd part of the test, try with correct information after first attempt failed, see in issue description:
You change the database name and resubmit.
Gives you "0 A Database error occurred."
Cannot install joomla.
yes, i've understood that, but,
i've done the same steps on a pdo postgresql
where i don't have the GRANT to create a new database
so 1st attempt with a new db name the correct error message has been display
after i've setted the already existing db name .... but i've got no error and the installation went fine
so i've asked to replicated the same on a mysql.......unfortunately I currently don't have on my laptop
sorry I should have watched the video
It might be that particular hosters don't allow underscore in db name, like we have it in the default name, and maybe this causes the connection abort due to missing error handling, or the hoster's db (or our db driver or the db cleitn or whatever) behaves strange with that, but when having other error, e.g. missing privilege, the hoster (or our db driver or the db cleitn or whatever) reacts correct and returns the right error.
Just an idea.
I have tested it and can confirm the exact results.
If you have the wrong details and then try to connect with the correct details then you get the error as described
Labels |
Added:
?
|
I have an idea where to look for it in our code .. will do so tomorrow.
I agree with beta-blocker.
then it should be a mysql driver issues.... postgresql rocks
Labels |
Added:
J4 Issue
?
Removed: ? |
Status | Information Required | ⇒ | Confirmed |
Labels |
Removed:
?
|
Build | staging | ⇒ | 4.0-dev |
I was not able to reproduce it on a Linux host, neither with MySQL 5.7 (both MySQLi and PDO driver) nor with PostgreSQL10.10.
Maybe it's related to a particluar DB server or client version? Or it needs to remove the cookie with the saved session information before each test?
Labels |
Added:
?
|
Ok, now I have tested again with deleting the session cookie before each test. I could replicate the issue with the "MySQLi" driver, but not with "MySQL (PDO)" and also not with "PostgreSQL (PDO)".
@brianteeman Have you tested with "MySQLi"? If yes, what happens for you if you try with "MySQL (PDO)" and remove the session cookie before the test, if there is one?
On J3 it seems that we don't have this issue. There is no default db name suggested, but when I manually enter the wrong "joomla_db" and then get the error not having the privilege to create the db and then correct the db name to the right, existing db, installation continues and finishes with success at the end.
So I can confirm it is a J4 issue or if a framework issue then a 2.0-dev issue there.
it is nothing to do with a default_db name
it is something to do with the new installation code
@brianteeman Yes. But can you confirm it doesn't happen with "MySQL (PDO)", only with "MySQLi"?
it does happen with pdo
as soon as you try to install with the wrong database credentials and get the error then any changed credentials are not "honoured"
Must be something in the new installer code, I agree. installation/src/Model/SetupModel.php
or installation/src/Model/DatabaseModel.php
... somewhere there.
the installer is such a pile of poop I dont know why we use it
Yes, I just ask myself if it was a moment of masochism when having assigned this issue to myself.
Labels |
Added:
?
Removed: ? |
It's not a beta blocker we cause it fixing this wouldn't case a b/c break
Labels |
Added:
?
|
Labels |
Removed:
?
|
@wilsonge I've assigned this issue to myself and will try to find the error and fix it, but I can do it mainly on weekends only, and it might be that I need help/advise. Maybe it is a similar issue than the one we had with language changing at the end of installation, which you have fixed a while ago, regarding what is saved in the session and what is taken when from the form. So if you find time to have a look on it, too, it would be very welcome.
P.S.: With what you have once fixed I meant PR #27439 .
Of course other readers too are welcome to help and advise.
Priority | Medium | ⇒ | Urgent |
Labels |
Removed:
?
|
Increasing priority as per guidelines for beta-blockers.
Labels |
Added:
?
|
Labels |
Added:
?
Removed: ? |
This issue would be pretty easy to solve with changing 1 value in 1 line of code if we would drop the possibility to let the installation create a database if it doesn't exist yet. Am still clarifying on diverse channels, opinions are welcome. If necessary I will make an RFC issue or RFC PR. If keeping the feature to create the db, it could become more complicated.
I'd rather keep the feature - but I need some time to figure out where the right place is - we probably can't validate we have permissions to create DBs in the validate step (but need to confirm that after reading some docs). So likely we need to improve how the error reporting works from the installer itself
we probably can't validate we have permissions to create DBs in the validate step
@wilsonge Replace the "probably" by "very likely" or even "for sure". Currently there is no check if the user can create databases or not, there is just a check if connection failed, and if so, it is tried to determine by the particular error message if the database is missing or not, and if missing, it is tried to create it (all in the DatabaseModel of the installation). Depending on the particular database type and driver type and on the particular user the error returned can be very different and so not really be useful to detect what the problem is, database not existing or user not having privileges to connect without selecting the database. Read the code in the DatabaseModel and you will see it is a mess. Another thing is that you can't verify the server version and the connection encryption settings when not being connected to a database (at least our driver seems not to allow that). And so we would have to shift these parts of connection validation to after the attempt to create the db in the database model, or we mode the attempt to create the db to the setup model's connection validation step. I would prefer the latter because from my point of view having the database belongs to the connection validation. Of course that would not save us from improving error handling in case if some later step, e.g. create a table, fails, but it would make the connection validation less complicated because all would be at one place.
Closing as having PR. Issue always can be re-opened if PR is not good.
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-03-08 14:43:35 |
Closed_By | ⇒ | richard67 |
Status | Closed | ⇒ | New |
Closed_Date | 2020-03-08 14:43:35 | ⇒ | |
Closed_By | richard67 | ⇒ |
Reopening because PR #28273 has just been closed.
The PR was correct and solved the issue, but it went into a wrong direction, see @wilsonge 's comment there.
Will try to make a new PR, but it may take some days until I find time, very likely weekend.
Status | New | ⇒ | Confirmed |
@Oemand @brianteeman @alikon Please test #28345 .
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-03-14 22:37:33 |
Closed_By | ⇒ | richard67 |
Closing as having a Pull Request (PR).
Labels |
Removed:
?
|
2 questions: