Bug #49186
closedInstall tool: DB port setting magic
100%
Description
Currently, the "DatabaseConnect" step is executed, if a "port" setting is missing in typo3_conf_vars db. This is technically ok, since after switch to mysqli in 6.1, the connect methods needs a port setting.
Currently, the bootstrap db connect method tries a split of the former host setting into host and port and then sets the port silently. This is a bit ugly, since this is performed on each and every request. Furthermore, the split can fail, if a ipv6 address is given with a port (eg. [:::1]:3306)
Thus, I suggest to let the bootstrap just redirect to install tool if port is missing, and then implement a solid "silent upgrade" within the database connect class of the step installer before "needsExecuction" is done. This way, if the silent upgrade is ok, the step won't come up. Furthermore, the bootstrap code can be cleaned up from this implicit upgrade.
There is another ticket in this area, regarding 'socket' connection to db. This could also be implemented in the DatabaseConnect then, maybe with a checkbox if host is localhost, no port is needed then.
Furthermore, it is important to note that the mysqli connect method ignores the port setting, if host is set to 'localhost' and not '127.0.0.1', so another "silent upgrade" could switch from string 'localhost' to '127.0.0.1' if the port setting is not the default mysql port 3306.
Updated by Ernesto Baschny over 11 years ago
Do not change "localhost" with "127.0.0.1", as the first one connects through a SOCKET and the second one through TCP/IP. It requires different authentication to MySQL and potentially MySQL is not even listening on 127.0.0.1 (just a socket).
Updated by Gerrit Code Review about 11 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23332
Updated by Gerrit Code Review about 11 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23332
Updated by Michiel Roos about 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 45cbe771497973c0e67a2771f988f0c41b068d17.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed