MetaModels / core

MetaModels Core Module
GNU Lesser General Public License v3.0
96 stars 42 forks source link

SQLSTATE[3D000]-error during installation MM 2.1.8 and C4.4.47 #1376

Closed Sarahsolus closed 4 years ago

Sarahsolus commented 4 years ago

MM: v2.1.8 (but also earlier versions, that were working 2 weeks ago) Contao: 4.4.47 Php: 7.2

During installation of current MM v2.1.8 and Contao v4.4.47 via composer, near the end the installation breaks with these errors:

[WARNING] Some commands could not be registered:

In AbstractMySQLDriver.php line 113:

An exception occurred while executing 'SHOW FULL TABLES WHERE Table_type = 'BASE TABLE'':

SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected

In PDOConnection.php line 109:

SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected

In PDOConnection.php line 107:

SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected

[WARNING] Some commands could not be registered:

In AbstractMySQLDriver.php line 113:

An exception occurred while executing 'SHOW FULL TABLES WHERE Table_type = 'BASE TABLE'':

SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected

In PDOConnection.php line 109:

SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected

In PDOConnection.php line 107:

SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected

"metamodels/bundle_all": "< 2.1.7", "metamodels/core": "< 2.1.7",

doesn't help.

discordier commented 4 years ago

@zonky2 Can you reproduce this?

@Sarahsolus Is there any chance you can provide us with a stack trace?

zonky2 commented 4 years ago

@discordier getestet - kann ich nicht nachvollziehen... weitere Diskussion hier https://community.contao.org/de/showthread.php?77369-SQLSTATE-3D000-Fehler-bei-Installation-MM-2-1-8-und-C4-4-47

@baumannsven hat sich angeboten, dass mal anzusehen - Kontakt per PM

baumannsven commented 4 years ago

Das Problem liegt wahrscheinlich am Warmup vom Cache. Wenn keine Datenbank konfiguriert ist. Werde mir später das mal anschauen

Sarahsolus commented 4 years ago

Erst einmal Danke nochmal an den netten Hilfesteller am Telefon. @baumannsven

Der Grund für den Fehler scheint tatsächlich zu sein, dass neuerdings eine parameters.yml samt schon vorhandener Datenbank von Metamodels erwartet wird. Bei unserem git repo, das ich zur Contao Installation auf den Server klone, ist keine parameters.yml enthalten. (die wurde dann am Schluss erst mit contao/install erzeugt) Das war bisher kein Problem, und ist es auch weiterhin nicht, wenn ich kein Metamodels mitinstalliere.

Das macht den Deployment-Vorgang natürlich in Zukunft etwas zäher, wenn ich auf dem Server erst die parameters.yml umschreiben muss, aber grundsätzlich weiß ich jetzt erstmal, wie ich das Problem umgehen kann. Vielen Dank für's Mitüberlegen.

discordier commented 4 years ago

Did we introduce this with the migrations? 🤔 IMO this is the only part that might interface with the database during boot time, however this should be limited to the install tool.

discordier commented 4 years ago

Excellent analysis by webstar in this posting.

dmolineus commented 4 years ago

Excellent analysis by webstar in this posting.

Great you found it, just wanted to repeat the information here. :-)

discordier commented 4 years ago

Working on the fix atm. :smile_cat:

bezin commented 4 years ago

I just tested this and it works as expected!

zonky2 commented 4 years ago

fixed https://github.com/MetaModels/core/pull/1378

zonky2 commented 4 years ago

see https://github.com/MetaModels/core/releases/tag/2.1.9