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)")
Related
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 .
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?
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.
<-- 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
I'm unable to connect to Google Cloud SQL from my desktop mysql client. I am also unable to set the sql instance password in google console. It says "instance is busy". I was able to connect to the sql instance using this same command line few weeks ago. Now it's unclear why it is not allowing the same. I see a similar question being asked before but it does not have any resolution.
c:\mysql --host=xxx.xxx.253.xx --user=root --password
ERROR 1045 (28000): Access denied for user 'root'#'xxx.xxx.214.xxx' (using password: NO)
The reason I'm trying to connect from the command line is that my access to the same DB from GAE is also failing with the same error as below.
com.xxx store: java.sql.SQLException: Access denied for user 'root'#'localhost' (using password: YES)
This is the first time I'm trying to access the database from a GAE app. Any idea why the mysql client is not connecting and where I should look to troubleshoot?
Edit:
mysql client connection issue is resolved by upgrading to a newer mysql version (5.6.19). The GAE connection issue persists.
The jdbc url I use is
"jdbc:google:mysql://projid:sqlinstance/dbname?user=root&password=root"
The GAE connection issue was resolved by removing the password from the URL. The new jdbc
url is "jdbc:google:mysql://projid:sqlinstance/dbname?user=root".