Installation

Issue with Library Browser after upgrade to 2.19

Re: Issue with Library Browser after upgrade to 2.19

by Glenn Rice -
Number of replies: 1

You have two problems which are shown in the output from the OPL-update script that you posted.

First, you have local changes to files in /opt/webwork/libraries/webwork-open-problem-library.  As a result git aborts when the script attempts to checkout the release branch.  So if the database is updated (it isn't because of the other error), then the information in the database won't match the files on disk.  This is what the following output means:

error: Your local changes to the following files would be overwritten by checkout:
    OpenProblemLibrary/Rochester/setTrig03FunctionsRightAngle/srw6_2_11.pg
    OpenProblemLibrary/Rochester/setTrig03FunctionsRightAngle/srw6_2_3.pg
    OpenProblemLibrary/Rochester/setTrig03FunctionsRightAngle/srw6_2_7.pg
    OpenProblemLibrary/UVA-Stew5e/setUVA-Stew5e-C05S04-IndefInts/5-4-07.pg
To fix this remove your local changes on those files. You could copy those files elsewhere, run the OPL-update script, and then copy those files back, if those local changes are something you want.

The other issue is ERROR 1046 (3D000) at line 22: No database selected that you noticed. This is certainly what is causing the error that is shown when you try to work with the library browser.  The database isn't actually being imported from the downloaded metadata release.  I am not exactly sure what is causing that, but something isn't right with your setup.  First check all of your database settings in site.conf and make sure they are correct.

In reply to Glenn Rice

Re: Issue with Library Browser after upgrade to 2.19

by Anthony Weaver -
Glenn,

Thanks I had just finished addressing the issue with git aborting because of problems being changed before you replied. It was indeed a database setting in site.conf. Our site.conf was still using this format for the database info:
$database_dsn="dbi:mysql:webwork"

I commented that out and made it match site.conf.dist which has:

# Modern database DSN format:
# DBI:driver:database=$database;host=$hostname;port=$port (when DB not on localhost)
# or DBI:driver:database=$database;host=127.0.0.1;port=$port (when DB on localhost, using TCP)
# See: https://metacpan.org/pod/DBD::MariaDB#port
# "To connect to a MariaDB or MySQL server on localhost using TCP/IP,
# you must specify the host as 127.0.0.1 with the optional port, e.g. 3306."
# or DBI:driver:database=$database (when DB on localhost, using socket)

# One thing on which it depends is the driver name, which you may want to modify.
# It also depends on the database name, which may be non-standard in some settings,
# as may be the hostname and port of the database server.

# driver should be one of:
# "mysql" for the DBD:mysql driver
# "MariaDB" for the DBD:mysql driver

# Select the desired DB driver:
$database_driver="mysql";
#$database_driver="MariaDB";

$database_host="localhost";
$database_port="3306";
$database_name="webwork";

# For a DB on localhost - default to using Unix socket.
# Change to 0 to use a TCP connection to 127.0.0.1.
$database_use_socket_if_localhost=1;

if ( $database_host eq "localhost" ) {
if ( $database_use_socket_if_localhost ) {
$database_dsn="DBI:$database_driver:database=$database_name";
} else {
$database_dsn="DBI:$database_driver:database=$database_name;host=127.0.0.1;port=$database_port";
}
} else {
$database_dsn="DBI:$database_driver:database=$database_name;host=$database_host;port=$database_port";
}

# The default storange engine to use is set here:
$database_storage_engine = 'myisam';