Egorrishe
Egorrishe

Reputation: 48

Heroku. MariaDB. Access denied for user

I'm creating new app on Heroku. Installed add-on "JawsDB Maria" successfully - I can open it's dashboard

In PHP on connection to DB I receive error:

SQLSTATE[HY000] [1044] Access denied for user 'vcgu1h273742rn5l'@'%' to database 'jeyx2j66ipgtqe11'

I'm sure that problem is not in PHP, because the same error I receive even on MariaDB dashboard trying to Create New Databite - https://prnt.sc/rj4dr4 .

Looks like solution is to GRANT ALL PRIVILEGES to user. But using dashboard I can't execute even SHOW GRANTS.

Questions:

  1. Can somebody help how to solve this problem?
  2. Or, at least, which way I can GRANT ALL PRIVILEGES?

I've tried:

Additional info - I'm sure it is not important, but just in case it is:

Upvotes: 0

Views: 1830

Answers (2)

Egorrishe
Egorrishe

Reputation: 48

I've waited for 8 hours, hoping there is some trigger, that will complete all necessary settings. But it didn't helped.

Then I reinstalled this add-on. And now all works fine! So, that was some kind of "JawsDB Maria" bug.

Upvotes: 0

O. Jones
O. Jones

Reputation: 108841

You probably know how to read your error message. At any rate, my superpower is explaining the obvious. So, ... here goes.

SQLSTATE[HY000] [1044] Access denied for user 'vcgu1h273742rn5l'@'%' to database 'jeyx2j66ipgtqe11'

Tells you your php program couldn't get to the MySQL server. That operation goes in these steps.

  1. Make a TCP/IP network connection to the server. SUCCESS.

  2. Present a user name and password to the server. SUCCESS.

  3. But the server rejected those credentials. FAILURE

  4. Access the database schema mentioned in the connect request. Not attempted yet. So we have no information about whether the named database actually exists.

The success of step 1 means there are no firewall or network-routing issues. That's good.

The success of step 2 gives us even more confidence about firewall issues.

The failure of step 3 tells us that we're not using a username and password that the MySQL server knows about.

Step 4 is incomplete. So, even if we fix the username and password issues, we still might get another issue before this mess is behind us.

Heroku assigns those usernames to their customers. So, check on the appropriate Heroku control panel to see whether you're using the right username / password credentials. Your error message says you've got wrong credentials.

Next step? Ask your vendor for help. Is Bruce Schneier is reading this? Maybe he can fix this for you from his earbuds while he's riding on the subway. But none of the rest of us here on SO can fix it.

Upvotes: 0

Related Questions