Heroku. MariaDB. Access denied for user - mysql

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:
Can somebody help how to solve this problem?
Or, at least, which way I can GRANT ALL PRIVILEGES?
I've tried:
read Heroku docs: JawsDB MySQL, PHP + DB
searching for similar problems in Heroku support, Google, SO:
the best match I found is here. But heroku pg:psql - it's tool only for PostgreSQL.
tried to find useful command for my case in Heroku CLI Commands
Additional info - I'm sure it is not important, but just in case it is:
project is based on Yii2
for easy deployment on Heroku installed "purrweb/yii2-heroku"

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.
Make a TCP/IP network connection to the server. SUCCESS.
Present a user name and password to the server. SUCCESS.
But the server rejected those credentials. FAILURE
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.

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.

Related

Docker MySQL "Access denied for user 'root'#'localhost" outside of terminal

I know that this is a fairly common error, but the curious thing is that in this case the credentials work when I'm logged in to Docker and working with mysql in the terminal. But when I try to use a client like DBeaver or MySQL Workbench, or even making an API call via Python, I get the error "Access denied for user 'root'#'localhost".
I thought it might be because I have another local MySQL database using port 3600, so I changed it to 3700 but the problem persists. I've made sure that the image is running in the Docker application, and besides, as mentioned, it works using the terminal. This is on MacOS Ventura. If there's any other information I can provide that would help, please let me know. Any assistance is appreciated!

DATABASE - Is phpMyAdmin.co down?

I'm working on a project with a DB and whe are using phpMyAdmin.co for administration and I'm not able to connect with my DB administration (phpMyadmin) anymore (yesterday was the last time it worked).
I have tried to reach my host sql7 and phpMyadmin.co and they both didn't work. They where offline.
I've already looked here for the error "Too many connection" and they say I need to adjust something in my administration. But since I can't reach phpMyadmin It's not possible the do that.
Error: Authentication to host 'sql7.freemysqlhosting.net' for user 'sql7269519' using method 'mysql_native_password' failed with message: Too many connections'
Does anyone know if there are some issues with phpMyadmin.co or is there a problem with my code.

Initial database connection error at the start of the day

Context: Telephony system (Asterisk) using the MySQL C API to connect to the database to lookup the routing for a call as it comes in. The lookup involves connecting to the database, executing a query, then closing the connection.
Sometimes the very first call in the morning generates the following error:
Access denied for user 'asterisk'#'127.0.0.1' (using password: YES)
Normally this would mean the password was wrong, but that's obviously not the case here, since it uses the same user and password all the time for all the calls. It's as if the system has somehow "gone to sleep" or perhaps a file handle has become stale somewhere, so that the first attempt to the connect to the database fails, but the rest work fine. Also it only happens occasionally, so I'm unable to replicate it - very strange!
I'm using Asterisk 1.8.32 with MySQL 5.5 on Debian 8.7.
It's a bit of a headscratcher, so I would be grateful for any suggestions!
First of all it is very bad idea use 1.8.* tree at current moment becuase of security feature.
Move to 11.* fix this issue.
Also you can do following in my.cnf
interactive_timeout=
Set to any value more then 4 days(weekend)
Other option is reload mysql module by crontab every 3 hrs.
Best option(except upgrade) is move from mysql to res_odbc, which have keepalive option. res_config_mysql considering deprecated, so any new systems should use ODBC.

Database query on MYSQL

I had installed Zend Server CE in my laptop and i have tried to open my phpMyAdmin page via my email address but i got following message ie (#1045 Cannot log in to the MySQL server). what is the possible solution.
Error #1045 means that you have provided wrong username or password.
http://dev.mysql.com/doc/refman/5.0/en/error-messages-server.html#error_er_access_denied_error
What have you already tried? Knowing nothing of that, here is what I would check:
Is there a MySQL server installed?
Is it running?
Can you use the MySQL command-line client to connect to the MySQL daemon?
That last step prompts its own series of troubleshooting steps, which mostly boil down to "are you using the right username/password and does that user have appropriate permissions." If you don't know how to suss that out, you should do some more research.

symfony database access configuration problem

I just joined a web dev project that uses Symfony 1.4 on CentOS 5.4 with MySQL. The server is down. My first task in the project is to get it back up. I don't know a lot about Symfony.
The Apache server log says
Access denied for user 'root'#'localhost' (using password: NO)
From all I can tell, the database access configuration is stored in
/var/www/html/<project name>/config/databases.yml
and for some reason, there's also some config in
/var/www/html/<project name>/config/propel.ini
There was no password for user root in either of the files, so I thought adding it and restarting Apache would finx the issue. It does not, the error message stays the same. I might be looking at the wrong config files, but I can't find any other.
Any wild guesses how to fix this ?
Cheers,
ssc
OK, I know now what I did wrong: The password indeed has to be added to databases.yml, but whenever the configuration is changed, the symfony cache needs to be cleared by executing
./symfony cc
in the /var/www/html/<project name>/ folder.
You are right, the database config file is stored at /WEB/project/config/databases.yml
You can also try to run the configure:database command from the symfony command line tool.
php symfony configure:database "mysql:host=DBHOST;dbname=DBNAME" USER PASS
A getting started guide, and much more can be found at: http://www.symfony-project.org/jobeet/1_4/Propel/en/