Upgrade to 2.6 with MySQL DB 8

191 views
Skip to first unread message

r.alex....@gmail.com

unread,
Jul 21, 2020, 2:25:39 PM7/21/20
to AtoM Users
So, I've been playing with this upgrade on our dev system today and had to upgrade our MYSQL from 5.7 to 8.0.21.

Dumped the atom DB, recreated with the new encoding, reloaded the data... and now when I go to run the upgrade step, I get the error below...

Tried with the native MySQL 8 settings, plus adding in "default_authentication_plugin=mysql_native_password"

Any advice?

Alex

Unable to open PDO connection [wrapped: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client]
[exception]   500 | Internal Server Error | PropelException[message]     Unable to open PDO connection [wrapped: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client][stack trace]
  at () in SF_ROOT_DIR/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel/Propel.php line 619
  at Propel::initConnection(array('dsn' => 'mysql:dbname=atom;port=3306', 'user' => 'SQLUser', 'password' => 'SQLPwd', 'classname' => 'PropelPDO', 'options' => <em>array</em>('ATTR_PERSISTENT' => 1), 'settings' => <em>array</em>('charset' => <em>array</em>('value' => 'utf8mb4'), 'queries' => <em>array</em>())), 'propel') in SF_ROOT_DIR/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel/Propel.php line 532
  at Propel::getConnection('propel') in SF_ROOT_DIR/lib/model/om/BaseObject.php line 64
  at BaseObject::get(object('Criteria')) in SF_ROOT_DIR/lib/routing/QubitResourceRoute.class.php line 28
  at QubitResourceRoute->bind(array('path_info' => '/', 'prefix' => 'symfony/symfony', 'method' => 'GET', 'format' => <em>null</em>, 'host' => '', 'is_secure' => , 'request_uri' => 'http://'), array('module' => 'staticpage', 'action' => 'home', 'slug' => 'home')) in SF_ROOT_DIR/vendor/symfony/lib/routing/sfPatternRouting.class.php line 372
  at sfPatternRouting->parse('/') in SF_ROOT_DIR/lib/QubitPatternRouting.class.php line 38
  at QubitPatternRouting->parse('/') in SF_ROOT_DIR/cache/qubit/cli/config/config_factories.yml.php line 96
  at require('/usr/share/nginx/atom-2.6.0/cache/qubit/cli/config/config_factories.yml.php') in SF_ROOT_DIR/vendor/symfony/lib/util/sfContext.class.php line 155
  at sfContext->loadFactories() in SF_ROOT_DIR/vendor/symfony/lib/util/sfContext.class.php line 77
  at sfContext->initialize(object('qubitConfiguration')) in SF_ROOT_DIR/vendor/symfony/lib/util/sfContext.class.php line 60
  at sfContext::createInstance(object('qubitConfiguration')) in SF_ROOT_DIR/lib/task/migrate/arUpgradeSqlTask.class.php line 79
  at QubitUpgradeSqlTask->execute(array('task' => 'tools:upgrade-sql', 'target' => <em>null</em>), array('help' => , 'quiet' => , 'trace' => , 'version' => , 'color' => , 'application' => 'qubit', 'env' => 'cli', 'connection' => 'propel', 'no-confirmation' => , 'verbose' => )) in SF_ROOT_DIR/vendor/symfony/lib/task/sfBaseTask.class.php line 68
  at sfBaseTask->doRun(object('sfCommandManager'), null) in SF_ROOT_DIR/vendor/symfony/lib/task/sfTask.class.php line 97
  at sfTask->runFromCLI(object('sfCommandManager'), null) in SF_ROOT_DIR/vendor/symfony/lib/command/sfSymfonyCommandApplication.class.php line 76
  at sfSymfonyCommandApplication->run() in SF_ROOT_DIR/vendor/symfony/lib/command/cli.php line 20
  at include('/usr/share/nginx/atom-2.6.0/vendor/symfony/lib/command/cli.php') in SF_ROOT_DIR/symfony line 14
[symfony]     v. 1.4.20 (symfony-project.org)
[PHP]         v. 7.2.32

José Raddaoui

unread,
Jul 21, 2020, 2:56:11 PM7/21/20
to AtoM Users
Hi Alex,

That looks like the authentication error and that you're on the right track. We have a note in the documentation to select the auth. method when MySQL is installed. I see that you already added it manually, maybe the mysql service was not restarted after that?

Best regards,
Radda.

r.alex....@gmail.com

unread,
Jul 21, 2020, 2:58:49 PM7/21/20
to AtoM Users
I had restarted the service after, and did so again, just in case... same error.

Alex

José Raddaoui

unread,
Jul 21, 2020, 3:16:02 PM7/21/20
to AtoM Users
Hi Alex,

Maybe because the user was created with the new authentication plugin, after changing the MySQL configuration to use the mysql_native_password plugin, you also need to change the user credentials:

sudo mysql -h localhost -u root -p -e "ALTER USER 'username'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';"

Bests.

r.alex....@gmail.com

unread,
Jul 21, 2020, 3:17:51 PM7/21/20
to AtoM Users
That did the trick.

Another tweak for the AtoM documentation I guess! :)

Alex

José Raddaoui

unread,
Jul 21, 2020, 3:27:58 PM7/21/20
to AtoM Users
Glad that made it, Alex!

I don't think the documentation needs tweaking. If the proper authentication plugin is selected in the MySQL installation (as noted in bold before the install command) then the user will be created with that same auth. method later on.

Best regards,
Radda.

Alex Fletcher

unread,
Jul 21, 2020, 3:31:47 PM7/21/20
to ica-ato...@googlegroups.com
Yeah, to upgrade to MySQL 8.0, we actually had to export the atom DB from 5.7, remove it, install 8.0 fresh/clean from a system package (so we had no opportunity to choose the authentication plugin), create the new DB, and import the atom DB.

It wouldn't surprise me if there are others in the same boat, so perhaps adding a note that if MySQL 8.0 is installed from system packages, this extra step may be required.

Alex

--
You received this message because you are subscribed to a topic in the Google Groups "AtoM Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ica-atom-users/ZzbjLZl-5VM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/a04ce4ed-0acc-41a2-9cfe-b7d7b73d8be4n%40googlegroups.com.

José Raddaoui

unread,
Jul 21, 2020, 3:39:06 PM7/21/20
to AtoM Users
Great point Alex, thanks!

I hope this thread helps other if that's the case and we'll revisit the need of adding such a note if it turns out to be an issue.

Bests.

Reply all
Reply to author
Forward
0 new messages