in reply to Re: DBD mysql
in thread DBD mysql

Some errors pertaining to .so files can refer to the file itself, or to a dependency. So if DBD/mysql/mysql.so exists, it could be that it's a dependency that's missing. Maybe the underlying MySQL library was updated and it now has a different name?

Re-installing DBD::mysql should fix the issue. Either that or DBD::mysql is being installed in a "non-standard" location and Perl wasn't told to look there.

Replies are listed 'Best First'.
Re^3: DBD mysql
by etj (Priest) on Sep 25, 2024 at 14:35 UTC
Re^3: DBD mysql
by dcscott (Novice) on Sep 28, 2024 at 19:39 UTC
    If I reinstall DBD::mysql am I risking breaking all my running scripts that use it? If those scripts fail, my business would suffer a big loss of income. Most of my billable activities are fed by these scripts. Of the many things I don't understand, why did this just break when there were zero changes on the server? And, why do they all work in html but just not on the command line?
      If I reinstall DBD::mysql am I risking breaking all my running scripts that use it? If those scripts fail, my business would suffer a big loss of income. Most of my billable activities are fed by these scripts.

      So, you have a broken system, or you may really break your system trying to fix it. In both cases, grab your last verified backup from before the incident and restore it. Problem solved.

      If you don't have a backup, then one of these is for you: Kein Backup kein Mitleid / No backup no mercy.

      Really, not having a working, verified backup is stupid. Running a business without a working, verified backup is even more stupid. See exhibits A, B, C, D, E.

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
        I have backups. Restoring yesterday's backup sacrifices today's billable income. And, I AM up and running ho html at the moment. I wonder if mysql is the fault because it works in one place but not another. That tells me to look to something other than mysql as the cause. I know most people would just rip up their server and reinstall everything instead of thinking the issue through.
      Are you able to print the contents of @INC on the scripts that are working? Are the scripts that are working and are not working on the same machine?

      UPDATE: For example, in your script that is working, right before the use DBD::mysql statement you could insert:

      BEGIN { open my $fh, ">", "/tmp/name-of-script.INC.txt"; printf $fh "%s\n", join "\n", @INC; }
      Also, are the scripts that are working and not working running under the same user?