Score:1

Installing to a MySQL database that requires SSL

sy flag

I am attempting to install Drupal 9 to a fresh host using an AWS MySQL RDS instance for a database. The database is configured to require SSL. When attempting to install via the web GUI, I receive PDOException: SQLSTATE[HY000] [3159] Connections using insecure transport are prohibited while --require_secure_transport=ON, which indicates that Drupal is attempting to connect without using SSL and that is working as one would expect. I have added the database config, including the appropriate PDO options for SSL, to settings.php but this causes a number of "unmet dependencies" errors that I believe stem from Drupal thinking that the database is already installed. I can connect to the db from the host in both the MySQL CLI and PHP, so I know the connection can work. How can I get Drupal to send its database test connection using SSL (or more generally, any driver specific options?)

EDIT: Looks like after adding the creds to settings.php, it did create some tables. However, the installation won't complete due to the below error:

The website encountered an unexpected error. Please try again later.
Drupal\Core\Config\UnmetDependenciesException: Configuration objects provided by <em class="placeholder">standard</em> have unmet dependencies: <em class="placeholder">block.block.bartik_account_menu (block, bartik), block.block.bartik_help (help, block, bartik), block.block.bartik_local_actions (bartik, block), block.block.bartik_search (search, block, bartik), block.block.seven_breadcrumbs (block), block.block.seven_help (help, block), block_content.type.basic (block_content), comment.type.comment (comment), contact.form.feedback (contact), core.entity_form_display.block_content.basic.default (text), core.entity_form_display.node.article.default (image.style.thumbnail, comment, image, path, text), core.entity_form_display.node.page.default (path, text), core.entity_form_display.user.user.default (image.style.thumbnail, image), core.entity_view_display.node.article.default (image.style.large, comment, image, text), core.entity_view_display.node.article.rss (core.entity_view_mode.node.rss), core.entity_view_display.node.article.teaser (core.entity_view_mode.node.teaser, image.style.medium, image, text), core.entity_view_display.node.page.teaser (core.entity_view_mode.node.teaser, text), editor.editor.basic_html (ckeditor, editor), field.field.block_content.basic.body (field.storage.block_content.body, text, field), field.field.comment.comment.comment_body (field.storage.comment.comment_body, text, field), field.field.node.article.body (field.storage.node.body, text, field), field.field.node.article.comment (comment, field), field.field.node.article.field_image (image, field), field.field.node.article.field_tags (field), field.storage.node.comment (comment, node, field), field.storage.node.field_image (file, image, node, field), field.storage.node.field_tags (node, taxonomy, field), field.storage.user.user_picture (file, image, field), filter.format.basic_html (editor, filter), filter.format.restricted_html (filter), node.type.article (node), rdf.mapping.comment.comment (comment, rdf), rdf.mapping.node.article (node, rdf), rdf.mapping.taxonomy_term.tags (taxonomy, rdf), taxonomy.vocabulary.tags (taxonomy), user.role.anonymous (comment, contact, filter, search), user.role.authenticated (comment, contact, filter, search, shortcut), user.role.content_editor (comment, contextual, file, node, path, taxonomy, toolbar, tour)</em> in Drupal\Core\Config\UnmetDependenciesException::create() (line 100 of core/lib/Drupal/Core/Config/UnmetDependenciesException.php).
Drupal\Core\Config\UnmetDependenciesException::create() (Line: 530)
Drupal\Core\Config\ConfigInstaller->checkConfigurationToInstall() (Line: 132)
Drupal\Core\ProxyClass\Config\ConfigInstaller->checkConfigurationToInstall() (Line: 196)
Drupal\Core\Extension\ModuleInstaller->install() (Line: 83)
Drupal\Core\ProxyClass\Extension\ModuleInstaller->install() (Line: 1658)
install_install_profile() (Line: 700)
install_run_task() (Line: 571)
install_run_tasks() (Line: 119)
install_drupal() (Line: 48)
id flag
The "unmet dependencies" thing sounds as if the MySQL max_allowed_packet setting hasn't been properly set for Drupal.
thunderblaster avatar
sy flag
Looks like max_allowed_packet is the default 64M, which worked properly for me on a similar install. Apache logs don't show anything more verbose than what is output to the display and the watchdog table was NOT created.
id flag
The "unmet dependencies" is a bit of a classic and in the past has been max_allowed_packet set too low. The error would actually be logged by the database instance, depending on its logging level.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.