Access denied: db.ini is correct

I’m trying to set up my first Omeka site using a lamp server with Digital Ocean. For some reason, no matter what I do, I always end up with the following error message:
Omeka Database Error

Access denied for user ‘bk’@‘localhost’ to database ‘katzir’.

Confirm that the information in your db.ini file is correct.

The db.ini file matches the MySQL login exactly. I’ve even created multiple databases just to make sure (and changed the db.ini file accordingly), but no matter what, I always get the same error message. What am I missing here? Thanks for your help.

I’m not sure if this is helpful, but I also see this error message when I go to [ipaddress]/install/install.php

Fatal error: Uncaught Zend_Db_Adapter_Mysqli_Exception: Access denied for user ‘bk’@‘localhost’ to database ‘katzir’ in /var/www/html/application/libraries/Zend/Db/Adapter/Mysqli.php:340 Stack trace: #0 /var/www/html/application/libraries/Zend/Db/Adapter/Mysqli.php(549): Zend_Db_Adapter_Mysqli->_connect() #1 /var/www/html/application/libraries/Omeka/Db.php(322): Zend_Db_Adapter_Mysqli->getServerVersion() #2 /var/www/html/application/libraries/Omeka/Db.php(56): Omeka_Db->_getInitCommand() #3 /var/www/html/application/libraries/Omeka/Application/Resource/Db.php(64): Omeka_Db->__construct() #4 /var/www/html/application/libraries/Zend/Application/Bootstrap/BootstrapAbstract.php(695): Omeka_Application_Resource_Db->init() #5 /var/www/html/application/libraries/Zend/Application/Bootstrap/BootstrapAbstract.php(638): Zend_Application_Bootstrap_BootstrapAbstract->_executeResource() #6 /var/www/html/application/libraries/Zend/Application/Bootstrap/BootstrapAbstract.php(598): Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap( in /var/www/html/application/libraries/Zend/Db/Adapter/Mysqli.php on line 340

Access denied is pretty straightforward. There should be some issue with the credentials in db.ini, whether the user doesn’t have permission for that specific database, or they’re not set up to log in from localhost, or the name or password are wrong, or even the server isn’t actually supposed to be localhost, something along those lines.

Can you log in with your credentials using the command-line mysql client?

Right! Virtual server has to be ip address, not “localhost.” Thank you!