[Archivesspace_Users_Group] mysql db connection error

Blake Carver blake.carver at lyrasis.org
Thu May 2 15:41:40 EDT 2019


Could be a MySQL8 issue. That being said, the error might be up father near the top in your log file, I don't see a good error in what you posted.

Read the log from the top down, there will be something that is the first sign of trouble with MySQL, probably within 50 lines or so, that should explain it.

MySQL 8 is a bit different. The GRANTS are a bit different:

CREATE USER 'jeffrey'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON db1.* TO 'jeffrey'@'localhost';


Also, the docs have this note:

NOTE: For MySQL 8. MySQL 8 uses a new method (caching_sha2_password) as the default authentication plugin instead of the old mysql_native_password that MySQL 5.7 and older used. This may require starting a MySQL 8 server with the --default-authentication-plugin=mysql_native_password option. You may also be able to change the auth mechanism on a per user basis by logging into mysql and running ALTER USER 'archivesspace' IDENTIFIED WITH mysql_native_password BY '123456';. Also be sure to have the LATEST MySQL Connector for Java from MySQL in your /lib/ directory for ArchivesSpace.


I have been able to run ArchivesSpace on 8, but it does have a couple small issues to work through sometimes.

________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Brian Sheppard <brian.sheppard at wisc.edu>
Sent: Thursday, May 2, 2019 3:30 PM
To: archivesspace_users_group at lyralists.lyrasis.org
Subject: [Archivesspace_Users_Group] mysql db connection error


I'm having a problem connecting to a localhost mysql backend and, despite having perused a number of related threads, can't get it to work. I'd appreciate any insight.

AS runs normally when I use the default backend (when AppConfig[:db_url] is commented out). When uncommented,
I get a db connection error, though I can connect to the db via the mysql command-line using the same credentials specified in config.rb. The user has all privileges on the archivesspace db. Also, I see nothing in my mysql_error.log beyond startup comments.

The connector is in lib:
archivesspace_2_5_1/lib/mysql-connector-java-8.0.16.jar

mysql:  Ver 8.0.13 for osx10.12 on x86_64 (Homebrew)
java: version "1.8.0_211"
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin16]
jdbc-mysql gem: jdbc-mysql (5.1.42)

Redacted config.rb line:
AppConfig[:db_url] = "jdbc:mysql://localhost:3306/archivesspace?user=[adminuser]&password=[foo]&useUnicode=true&characterEncoding=UTF-8&useSSL=false"

TRACE:
Database connection failed from
/archivesspace_2_5_1/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:1411:in `configure' from
archivesspace_2_5_1/data/tmp/jetty-0.0.0.0-8089-backend.war-_-any-/webapp/WEB-INF/app/main.rb:78:in `<class:ArchivesSpaceService>' from
rchivesspace_2_5_1/data/tmp/jetty-0.0.0.0-8089-backend.war-_-any-/webapp/WEB-INF/app/main.rb:38:in `<main>' from
 org/jruby/RubyKernel.java:961:in `require' from
 uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55:in `require' from
 archivesspace_2_5_1/data/tmp/jetty-0.0.0.0-8089-backend.war-_-any-/webapp/WEB-INF/config.ru:1:in `block in (root)' from
 org/jruby/RubyBasicObject.java:1687:in `instance_eval' from
 archivesspace_2_5_1/data/tmp/jetty-0.0.0.0-8089-backend.war-_-any-/webapp/WEB-INF/config.ru:4:in `(root)' from
 uri:classloader:/vendor/rack-1.6.8/rack/builder.rb:55:in `<main>' from
 launcher/launcher.rb:92:in `start_server' from
 launcher/launcher.rb:157:in `main' from
 launcher/launcher.rb:261:in `<main>'


Thanks.
-Brian

—————————————————————————————
Brian Sheppard
UW Digital Collections Center
brian.sheppard at wisc.edu





_______________________________________________
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group at lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20190502/e5a51da6/attachment.html>


More information about the Archivesspace_Users_Group mailing list