I have a weird issue with my MariaDB in my application.
I use Prisma NodeJS library to connect to MariaDB.
The problem looks like this:
I have localhost and a remote server with the same username/password/database combination (to make it easier for me and not need to change configuration)
- I have a URL string with user, password, host, and database
- When I change the host to my remote server it still read localhost database
- If I change the password locally (my CLI) it reads the remote server
- The same if I change the password on the server and update the URL string
Is it possible that MariaDB saves the user/password/database in some kind of cache and takes a host based on that cache?
I use Fedora GNU/Linux 37 and MariaDB 10.5.18
Is this a bug in MariaDB should I report it somewhere?
I've asked about this on Prisma discussion page on GitHub
EDIT:
These are my URL strings:
DATABASE_URL="mysql://10669_koduj_quiz:<PASSWD>@localhost:3306/10669_koduj_quiz"
DATABASE_URL="mysql://10669_koduj_quiz:<PASSWD>@jcubic.atthost24.pl:3306/10669_koduj_quiz"
NOTE: It's obvious from my experimentation that the URL is cached but I'm not sure who is responsible for this. MariaDB, Prisma package, an NPM library that is used to connect to MySQL, or maybe there is some shared library on my system that is used by NodeJS library.