in reply to MariaDB : read credentials from file fails (via dsn option mariadb_read_default_file)

I use MariaDB with the exact same incantations as for mysql. In other words, I use the same DBI, the same DSN (with "mysql" in it instead of "MariaDB"), etc. I wonder if you might be changing more than is necessary. Essentially, whereas the code says "mysql", it actually points to the MariaDB installation (I don't have both on the same server, so it cannot possibly be accessing the database from anything other than the MariaDB installation). Now, perhaps someone will inform me that I have been doing it all wrong...but it has always worked for me this way.

Blessings,

~Polyglot~

  • Comment on Re: MariaDB : read credentials from file fails (via dsn option mariadb_read_default_file)

Replies are listed 'Best First'.
Re^2: MariaDB : read credentials from file fails (via dsn option mariadb_read_default_file)
by choroba (Cardinal) on Nov 06, 2023 at 11:33 UTC
    No, it should work this way, too. But DBD::MariaDB fixed some bugs DBD::mysql had and wasn't able to fix. Especially given your interest in languages using non-ASCII characters, you might be interested in how UTF-8 handling is different in the two Perl drivers.

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
      For some years now I have been consistently creating my databases with the utf8mb4 charset. As long as the Perl script outputs to the DB in utf8 and reads from it in utf8, there have been no issues. How is the MariaDB improved over this?

      Blessings,

      ~Polyglot~

        You can use the testing script introduced in the issue #18 in DBD::ODBC. You need to comment out the drivers you don't have.

        map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
Re^2: MariaDB : read credentials from file fails (via dsn option mariadb_read_default_file)
by bliako (Abbot) on Nov 06, 2023 at 17:05 UTC

    Thanks for the suggestion but I don't have DBD::mysql installed and so using it in the dsn fails for me.