Coming back to this question as I believe I have found the answer.
I use mariadb, and from what I gather you can only log in as -u root, even with password, when you run mysql with superuser permissions. This makes sense, as system services like mariadb are run as root. Therefore trying to access mariadb's root user from a standard user account won't work.
This has tripped me up multiple times, as mysql acts differently than mariadb in this case, and I had gotten used to the way mysql does it. If you run
mysql -u root -p
and enter the correct password (using mysql, not mariadb) it will work. It seems mariadb added another layer of security, needing you to not only know the mysql root user's password, but also have superuser permissions. Therefore, you must do
sudo mysql -u root -p
anytime you need to access the database as the root user. I haven't tested to see if this only applies to command-line access, or if programs running at user level would also be denied with proper credentials -- I suspect they would. This encourages the much more secure practice of creating users with limited permission scope, who can access only the databases they need access to.
So to the original point: this may have been a bug in phpmyadmin, as installing it via apt implies superuser permissions during install. Not sure what the specific issue with phpmyadmin is, but I do know why this bug happens.