sqlMessage: "Access denied for user 'user#host'(using password: YES)" - mysql

I got the following error when trying to use my react app that linked to mysqldb using nodejs:
code: "ER_ACCESS_DENIED_ERROR"
errno: 1045
fatal: true
sqlMessage: "Access denied for user 'user#host' (using password: YES)"
sqlState: "28000"
the nodejs hosted at Heroku and Mysqldb in an other server.
the password and user are correct.

I have solved this by adding the server where my front-end part are in to the authorized hosts to connect to my second server where I have the back-end part.
this error will launch only when you are using different servers for one micro-service app that used a mysql database and that required user and password to access.
In my case I used Cpanel so I navigate into an area when you can add your server and I put the name of server as authorized and then it's solved.
Just look into your cpanel and read the menu and click on something like "add hosts" or "add servers" or "authorized hosts" or whatever you they call it on the version you have and you will find a list where you can add it .

Related

(1045, "Access denied for user)

I am trying to connect my Django app on Heroku to an external MySQL database server of another domain. I have already set up the config variable but the Heroku app doesn't seem to be using them.
I get the error below. It seems the Heroku app is using an amazonaws host and not the one I have specified on the DATABASE_URL. Please help
(1045, "Access denied for user 'dekacoke_dekate'#'ec2-3-85-219-69.compute-1.amazonaws.com' (using password: YES)")

Mysql PDO Connection to external server

I'm trying to connect a index.php to a Mysql server external.
I'm using:
$g_con = new PDO('mysql: host=mysql.domain.com;dbname=dbname;charset=utf8', 'dbuser', 'dbpw');
But I get this error:
Fatal error: Uncaught PDOException: SQLSTATE[HY000] [1045] Access denied for user 'dbname'#'app3.data-center.com' (using password: YES)
I think the problem is that i need to connect to mysql.domain.com (this is my hostname and phpmyadmin login for my external DB) and website show access denied for dbname # app3.data-center.com and 'app3.data-center.com' is the web site hosting sever. Maybe my free hosting don't let me to connect to external db's or what?

MySQL server app runs, but MySQL Server doesn't load

I am running a Mac OS 10.12.3 and have downloaded the Mysql Server (which runs by clicking "start Mysql server" button), the green light comes on to indicate its running. But when I go over to add a MySQL workbench and try to "set up a new connection" with the following credentials:
Error Screenshot
I get an error message saying:
Failed to Connect to MySQL at 127.0.0.1:3306 with user root
Access denied for user 'root'#'localhost' (using password: YES)
I have gone to terminal and typed in "mysql" and get the same kind of error.
ERROR 1045 (28000): Access denied for user 'leobalboni'#'localhost' (using password: NO)
What am I doing wrong? I want to run the server and upload a database so I can do some exercises. Any help would be grateful.
If it is a fresh install, try reinstalling.
The last time i encountered this problem was because of a missing file/configuration.

Monitoring : Centreon - How to connect centreon user to database?

I'm running Centreon Entreprise Server (CES) 3.3 and added NagVis (1.8.x). They are on a virtual machine (Virtualbox).
When I suceeded in giving the rights to NagVis to reach my Centreon data, Centreon started displaying : "Database error: Could not connect to database", though the centreon user has all privileges on "centreon" and "centreon_storage".
Here's my central-broker-master.log :
[1467987167] error: storage: rebuilder: could not connect to Centreon Storage database: could not open database: Access denied for user 'centreon'#'localhost' (using password: YES) QMYSQL: Unable to connect
[1467988484] error: TCP: error while sending data to peer 'localhost:5670': The remote host closed the connection
[1467988492] config: module applier: loading directory '/usr/share/centreon/lib/centreon-broker'
[1467988492] config: correlation: invalid correlation configuration, correlation engine is NOT loaded
[1467988492] config: applier: 14 modules loaded
[1467988492] error: could not open database: Access denied for user 'centreon'#'localhost' (using password: YES) QMYSQL: Unable to connect
[1467988492] error: TCP: could not connect to localhost:5670: Connection refused
[1467988492] error: could not open database: Access denied for user 'centreon'#'localhost' (using password: YES) QMYSQL: Unable to connect
(the last error is written hundreds of times ...)
And I couldn't find other errors in different logs. (Or wasn't able to find the right logs ...)
The 'centreon' user has the rights on the databases with the IP address of my server as well as with my coputer's address. (This could have been a matter of rights from a distant location)
I don't know any other way to grant my 'centreon' user with extra rights on the database -- Is it even a valid idea to grant my user with all privileges ?
Thanks
EDIT : I tried to solve the problem by using this post : MySQL ERROR 1045 (28000): Access denied for user 'bill'#'localhost' (using password: YES) (I actually had a ''#'localhost' user), but my access to Centreon web is still denied.

How to connect mobile app using node js to a remote mysql database on Godaddy cPanel?

<-- ErrorPacket { fieldCount: 255, errno: 1045, sqlStateMarker:
'#', sqlState: '28000', message: 'Access denied for user
\'eazy_db\'#\'122.179.102.170\' (using password: YES)' }
Problem with MySQLError: ER_ACCESS_DENIED_ERROR: Access denied for
user 'eazy_db'#'122.179.102.170' (using password: YES)
Getting this error when node server is started. 122.179.102.170 is the router ip address instead of my server ip address.
If you can SSH into your server that is hosting your DB, type in the following Linux command to get your server's IP Address: ifconfig
The response from that command will look like this:
Notice the eth0 block. I highlighted it in a blue box.
That is the I.P. address of your MySQL server.
If you cannot SSH into the server that is hosting your MySQL database, I recommend following these steps and obtaining the Database Host name from the GoDaddy Console: Setting up an Access Database for Your Hosting Account