SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: NO)

I am trying to install hope billing.

I have got all the way through the install process, have a populated database (from checking it in virtualmin), however, the last step is to create a hope billing adminstrative user and select default currency.

As soon as i hit the submit button for new user, i get the following error

SQLSTATE[HY000] [1045] Access denied for user ‘’@‘localhost’ (using password: NO)

I have looked on stack exchange and found the following…https://stackoverflow.com/questions/10299148/mysql-error-1045-28000-access-denied-for-user-billlocalhost-using-passw

You probably have an anonymous user ‘’@‘localhost’ or ‘’@‘127.0.0.1’.

As per the manual:

When multiple matches are possible, the server must determine which of them to use. It resolves this issue as follows: (…)

When a client attempts to connect, the server looks through the rows [of table mysql.user] in sorted order.
The server uses the first row that matches the client host name and user name.
(…) The server uses sorting rules that order rows with the most-specific Host values first. Literal host names [such as ‘localhost’] and IP addresses are the most specific.

In webmin i dont have an anonymouse user as such, however there is
nobody 65534 nogroup nobody /nonexistent /usr/sbin/nologin

is this my problem? do i need to delete this user?

Once again…im a genius, only i havent a clue how i fixed it???

I think that what i ended up doing to fix the above error was to do the following…

Webmin>Webmin Users>billing (the name of my hopebilling unix user)

I then selected ALL for “Available Webmin Modules”

after doing this, i was able to immediately get through the hope billing installation.

The reason i cannot remember if this was exactly the fix is because that bloody google cloud sdk issue i am having reared its ugly head again with a virtualmin update and the server shit itself and i had to reboot it to gain access again.

"Webmin>Webmin Users>billing (the name of my hopebilling unix user)
I then selected ALL for “Available Webmin Modules”

That’s definitely not what solved a Box Billing problem. :wink:

You just made your box billing user a mostly root-level admin in Webmin. Which is probably not what you intended.

The reason i cannot remember if this was exactly the fix is because that bloody google cloud sdk issue i am having reared its ugly head again with a virtualmin update and the server shit itself and i had to reboot it to gain access again.

That doesn’t make sense. A failed update shouldn’t cause any problems with anything other than updating other software. Are you sure you’re not running out of memory?

Wasnt boxbilling…this is hopebilling (different program i am also tinkering with on an additional virtualmin virtual server account.)

I think that these programs may need super admin access? …they automatically provision purchased services on the server (such as more virtual server accounts for hosting websites, purchasing domains, email hosting etc). What i will do is progressively remove assigned modules until it stops working, then decide what the hopebilling server admin account should have access too…but for now its working. Its not particularly useful for me at present…almost everything on their website is in russian.

Tue google cloud sdk failure could be causing memory issues but i dont think that is not why update is failing. Most of the time my system is using less than 40% of its memory and almost no cpu. There are now 2 google cloud sdk update versions that dont work. Im sure it has something to do with fpm, cgi etc.

“I think that these programs may need super admin access?”

But, that’s not what you gave it. You gave it root access within Webmin only. The system user with the same name would still be limited to whatever access it normally has. Webmin has its own ACL and permissions system to allow delegation of sensitive tasks to less trusted users, or you can also grant a user full root-level access to all Webmin modules.

That is, unless this program is supposed to interact with Webmin/Virtualmin in some way? But, in that case, I would think it would use the Virtualmin API (either remote or local) and would need to be explicitly told how to do so.

Regardless, I’m reasonably confident you did something else in that process that made it work. Webmin access doesn’t add permissions for direct database access (your user would have Webmin access to all databases on the system, but the MySQL user by the same name would not). Webmin sits on top, and because it runs as root can grant its users access to anything on the system you configure it to grant. But, there’s a bunch of services underneath that have users associated with them and their own permissions and privileges. And, the error you had was coming from the database.

ah ok. i will keep searching and perhaps i will stumble across what it is that prevents the installation from working.

What is interesting for me, and perhaps others too, is that of the three billing/provisioning programs i am trialling, whmcs is the only one that installs almost perfectly first go. The other two require a bit of tinkering to get working.