Project

General

Profile

Actions

Bug #67036

closed

Switching between two RDBMS using dbal

Added by alexis nicolas almost 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2015-05-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.5
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Hello there,
I set up T3 v7.2 to run with PostgreSQL but I need a fallback to MySQL. To do so I changed LocalConfiguration.php parameters to point to a working mysql server, but backend login form returns "Database connect not successful. Connecting to the database with given settings failed. Please check."
Have I forgotten to change parameters or is it a bug?

Thanks by advance,
Alex

Actions #1

Updated by Jigal van Hemert almost 9 years ago

  • Status changed from New to Needs Feedback

Is there some configuration for the default DBAL handler in your LocalConfiguration.php?

'EXTCONF' => array (
  'dbal' => array (
    'handlerCfg' => array (
      '_DEFAULT' => array(
        'type' => 'adodb',
        'config' => array(
          'driver' => 'postgres',
        ),
      ),
    ),
  ),
)

If you switch to MySQL this needs to be changed to the mysql driver too.

Actions #2

Updated by alexis nicolas almost 9 years ago

At this moment, it works with PostgreSQL, my LocalConfiguration.php is this:

'EXTCONF' => array(
    'dbal' => array(
        'debugOptions' => array(
            'enabled' => TRUE,
            'numberRows' => TRUE,
            'printErrors' => TRUE,
        ),
        'handlerCfg' => array(
            '_DEFAULT' => array(
                'type' => 'adodb',
                'config' => array(
                    'driver' => 'postgres',
                ),
            ),
        ),
    ),
),

I'm trying switching to mysql driver but, surprisingly, it complains about the use of mysql_connect function. I thought mysqli or PDO were already in use.

Actions #3

Updated by Morton Jonuschat over 8 years ago

If I read it correctly you have two choices for switching back to MySQL:

1 - Set the key 'type' to 'native'
2 - Use 'mysqli' as driver type, not 'mysql', the latter uses the deprecated mysql_* functions

Actions #4

Updated by Alexander Opitz over 8 years ago

  • Status changed from Needs Feedback to Closed

No feedback within the last 90 days => closing this issue.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions

Also available in: Atom PDF