Hello,
I’m getting an error very similar to this thread, however, I have doublechecked all of my database settings and they are accurate.
I am running MySQL Server version 5.5.18 and PHP 5.6.22, and I’m trying to upgrade an EE install from 2.11.3 to 3.4.3.
I’m following the steps outlined here: https://docs.expressionengine.com/latest/installation/upgrade_from_2.x.html
I’m at Step 5: Run Upgrade, and I’m getting the error message:
Oops, there was an error Unable to connect to your database using the configuration settings found in the following file: config/config.php file. Please correct the settings so that the update can proceed.
I have uploaded the database.php and config.php from the 2.11.3 install into the new system/user/config/ folder, and so these are the exact same database settings which are in use with the working install of 2.11.3.
I downloaded the EE Server Wizard and ran it. It throws the following error
Fatal error: Uncaught exception ‘PDOException’ with message ‘SQLSTATE[HY000] [2005] Unknown MySQL server host ‘redacted.edu:64284’ (2)’ in /nfs/bronfs/redacted/ee_wizard/index.php:250 Stack trace: #0 /nfs/bronfs/redacted/ee_wizard/index.php(250): PDO->__construct(‘mysql:host=redacted…’, ‘redacted_db_user’, ”) #1 /nfs/bronfs/redacted/ee_wizard/index.php(130): check_db(Array) #2 {main} thrown in /nfs/bronfs/redacted/ee_wizard/index.php on line 250
Thanks in advance for any assistance!
I solved this issue. It was related to my custom port number for the MySQL server.
To solve this, I made three edits in config/database.php:
The previous settings worked with the old mysql driver, but mysqli and pdo requires the port number to be in a separate parameter.
The above port setting doesn’t seem to be documented anywhere that I could find.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.