Database Connection Failed - Error - mysql

I need help with sorting out this error. We purchased a website through sites and stores and just states "Upload your website files provided". I have done this directly into our CPanel and this is the error i have received:
Database Connection Failed
Error: Access denied for user 'healthinsurancea'#'localhost' (using password: YES) (1045)
Function Performed: CONNECT
Host/DB: localhost/healthinsurancea_db
Database Type: mysqli
Fatal error: Attempt to connect to database healthinsurancea_db on healthinsurancea#localhost failed in /home/healthin/public_html/lib/adodb.functions.php on line 61
Database Connection Failed
Error: Access denied for user 'healthinsurancea'#'localhost' (using password: YES) (1045)
Function Performed: CONNECT
Host/DB: localhost/healthinsurancea_db
Database Type: mysqli
Fatal error: Attempt to connect to database healthinsurancea_db on healthinsurancea#localhost failed in /home/healthin/public_html/lib/adodb.functions.php on line 61
Please inform me how to resolve this... Thanks

CPanel has an option, maybe with name 'remote database' or something similar. You should add your IP to this list where you tried to connect to it from.

Related

Fatal error: Uncaught mysqli_sql_exception: Access denied for user 'Adeleke'#'localhost' (using password: YES)

I tried testing my php software with Xammp (Local Host) but after hitting the url, i kept getting:
Fatal error: Uncaught mysqli_sql_exception: Access denied for user 'Adeleke'#'localhost' (using password: YES)
I thought it was from xammp PhpMyAdmin so i installed laragon nd tried testing the software on it, below is what it shows
Fatal error: Uncaught mysqli_sql_exception: Access denied for user 'Adeleke'#'localhost' (using password: YES) in C:\laragon\www\MyQueerDate\install\index.php:47 Stack trace: #0 C:\laragon\www\MyQueerDate\install\index.php(47): mysqli_connect('127.0.0.1', 'Adeleke', 'Badvibe019!', 'Laragon.MySQL') #1 {main} thrown in C:\laragon\www\MyQueerDate\install\index.php on line 47
Here is the code on MyQueerDate\install\index.php on line 46 - 49:
if (!empty($_POST['install'])) {
$con = mysqli_connect($_POST['sql_host'], $_POST['sql_user'], $_POST['sql_pass'], $_POST['sql_name']);
if (mysqli_connect_errno()) {
$ServerErrors[] = "Failed to connect to MySQL: " . mysqli_connect_error();
I was try to chech the output of the software and view the dashboard and the admin panel but it kept on showing;
Fatal error: Uncaught mysqli_sql_exception: Access denied for user 'Adeleke'#'localhost' (using password: YES) in C:\laragon\www\MyQueerDate\install\index.php:47 Stack trace: #0 C:\laragon\www\MyQueerDate\install\index.php(47): mysqli_connect('127.0.0.1', 'Adeleke', 'Badvibe019!', 'Laragon.MySQL') #1 {main} thrown in C:\laragon\www\MyQueerDate\install\index.php on line 47
I tried it on cpanel and it works but i dont want to be testing softwares on cpanel, i cant affford paying hosting fees for now and i want to try localhost.
Check user and login permissions
select user,host from mysql.user;
If you are in this list, you can connect normally
Check whether the password is correct
You can try to use mysql -uusername -ppassword to log in on the mysql server, you can better get the cause of the error, and then improve

org.mule.runtime.api.connection.ConnectionException

Part of Mule 4 training I am trying to connect MySQL database and getting error...
org.mule.runtime.api.connection.ConnectionException: Could not obtain connection from data source
org.mule.runtime.api.connection.ConnectionException: Could not obtain connection from data source
Caused by: org.mule.extension.db.api.exception.connection.ConnectionCreationException: Could not obtain connection from data source
Caused by: java.sql.SQLException: Cannot get connection for URL jdbc:mysql://mudb.learn.mulesoft.com:3306/training?logger=org.mule.extension.db.api.logger.MuleMySqlLogger$$EnhancerByCGLIB$$42140f7b : Access denied for user 'mule'#'cpe-104-139-120-137.carolina.res.rr.com' (using password: YES)
Caused by: java.sql.SQLException: Cannot get connection for URL jdbc:mysql://mudb.learn.mulesoft.com:3306/training?logger=org.mule.extension.db.api.logger.MuleMySqlLogger$$EnhancerByCGLIB$$42140f7b : Access denied for user 'mule'#'cpe-104-139-120-137.carolina.res.rr.com' (using password: YES)
enter image description here
let me know what else I need to change for a successful connection.
The root error is:
Access denied for user 'mule'#'cpe-104-139-120-137.carolina.res.rr.com'
It looks like nothing is wrong in the Mule application. You need to fix the password or the permissions for that user in the MySql database.
This article can be helpful to troubleshoot that.

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?

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.

BIRT 4.3.2 on Tomcat 7.0.53 on windows 8.1 64 bit gives error 'Cannot open the connection for the driver: org.eclipse.birt.report.data.oda.jdbc. '

I have been working on creating report using BIRT with MySql. While I am able to run the report successfully using BIRT viewer, when I try to integrate with tomcat, it gives the below error
org.eclipse.birt.report.engine.api.EngineException: An exception
occurred during processing. Please see the following message for
details: Cannot open the connection for the driver:
org.eclipse.birt.report.data.oda.jdbc.
org.eclipse.birt.report.data.oda.jdbc.JDBCException: Failed to get
connection. SQL error #1:Access denied for user 'root'#'localhost'
(using password: NO) ; java.sql.SQLException: Access denied for user
'root'#'localhost' (using password: NO)
Can anyone please help?
the error message indicates that you do not have permissions to loging to MySQL database using root without any password. As far as I remember, default password for root is 'sa' in MySQL. Please check whether you need any password for your database.