Project

General

Profile

Actions

Bug #70304

closed

Database connection fails at install tool step 4

Added by Oliver Eglseder about 9 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2015-10-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:

Description

Steps:
Clone the current master
Create FIRST_INSTALL
Database credentials: root, no password, socket
Select an existing empty database ("temp.vxvr")
Enter username and password for admin user
Get exception:

#1270853884: TYPO3 Fatal Error: The current username, password or host was not accepted when the connection to the database was attempted to be established!

Analysis:
The first DatabaseConnection is established in \TYPO3\CMS\Install\Controller\Action\Step\DatabaseData::importDatabaseData
Neither $GLOBALS['TYPO3_DB'] is used nor gets the resulting connection (line 129) written to the global var.

After that, in \TYPO3\CMS\Install\Service\SqlSchemaMigrationService::getCollationForCharset@158, the connection gets established again, but $GLOBALS['TYPO3_DB'] is used. The DatabaseConnection in the global var has no established connection. This leads to a second try to establish the database connection, which fails.

Solution: Always use $GLOBALS['TYPO3_DB'] for database connections

Actions

Also available in: Atom PDF