Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-34972

Database Schema Upgrade failed while upgrading to Koha 24.05 in Ubuntu 24.04 TS noble

    XMLWordPrintable

Details

    Description

      Dear folks,

      greetings from Monirul,

      During an upgrade of Koha to version 24.05.03-1, the process failed due to a database access error. The upgrade script was unable to connect to the MySQL/MariaDB database, suggesting a potential issue with database permissions or configuration.

      Steps to Reproduce
      1. Attempt to upgrade Koha-common package to version 24.05.03-1
      2. Run `sudo apt-get install mariadb-server`
      3. Confirm the installation/upgrade process

      Observed Behavior

      • The upgrade process fails during the database schema upgrade step
      • An error message indicates that access is denied for the Koha database user

      Error Message

      DBIx::Class::Storage::DBI::catch {...} (): DBI Connection failed: DBI connect('database=koha_monirul;host=localhost;port=3306','koha_monirul',...) failed: Access denied for user 'koha_monirul'@'localhost' (using password: YES) at /usr/share/koha/lib/Koha/Database.pm line 91. at /usr/share/koha/lib/Koha/Database.pm line 139
      

      Environment

      • Koha version being upgraded to: 24.05.03-1
      • Database: MariaDB (version 1:10.11.8-0ubuntu0.24.04.1)
      • Operating System: Ubuntu (likely 24.04 based on package versions)

      Additional Notes

      • The MariaDB server package was already at the newest version
      • The error suggests that the database user 'koha_monirul' exists but doesn't have the correct permissions to access the database

      Possible Causes
      1. Database user permissions have been changed or reset
      2. The database password stored in Koha's configuration doesn't match the actual database password
      3. The database server is not running or is not accessible
      4. The Koha database has been renamed or doesn't exist

      Suggested Next Steps
      1. Verify that the MariaDB service is running: `sudo systemctl status mariadb`
      2. Check the Koha database configuration file for correct credentials
      3. Attempt to connect to the database manually using the credentials in the Koha configuration
      4. Review and potentially reset the permissions for the 'koha_monirul' database user
      5. Check the MariaDB error logs for any additional information

      Impact
      The Koha system cannot be upgraded, potentially leaving it on an older version with security vulnerabilities or missing features. Normal library operations may be affected if the system is unusable after the failed upgrade attempt.

      Best Regards,
      Monirul

      Attachments

        Activity

          People

            Unassigned Unassigned
            monirul Md Monirul
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.