Comments - Problems with user access to db
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.
If you run select User, Host from mysql.user;
do you see an entry for sam with a host of localhost or %?
If not run CREATE USER 'sam'@'localhost' IDENTIFIED BY 'Your_Password_Here' ; flush privileges;
I get sam localhost.
You can check the mysql.user and mysql.db tables and see that everything is correct. Try connecting from the command line first (to both no database and then to the specific database) before trying to connect through the application to be sure where the error lies.