Hi I tried to connect to mysql using the wrong password. I finally made it there but now as I try to reach my homepage www.hari.se I just get following ;
Warning: mysql_connect(): Access denied for user 'hari.se'#'csea04.cliche.se' (using password: YES) in /home/virtual/hari.se/public_html/PHP/db.php on line 2
Warning: mysql_select_db(): Access denied for user 'root'#'localhost' (using password: NO) in /home/virtual/hari.se/public_html/PHP/db.php on line 3
Warning: mysql_select_db(): A link to the server could not be established in /home/virtual/hari.se/public_html/PHP/db.php on line 3
Warning: mysql_query(): Access denied for user 'root'#'localhost' (using password: NO) in /home/virtual/hari.se/public_html/index.php on line 7
Warning: mysql_query(): A link to the server could not be established in /home/virtual/hari.se/public_html/index.php on line 7
Access denied for user 'root'#'localhost' (using password: NO)
Please friends anyone who can help? Hari
your script is not able establish the connection to the database
also you should insert true information about the mysql connection into db.php file
and you can't insert the wrong password !!!!
you have some variable in this file
similar to below:
$database_hostname = 'localhost (as default) or your server hostname';
$database_username = 'root (as default) or your database username';
$database_password = '(in some local web servers we don't have any password for database but in hosting servers usually we have a defined password ) such as (3R8=&3pHEJ+J)';
$database_name = 'you must insert your database name in here';
$connection_mysql=mysql_connect($database_hostname,$database_username,$database_password);
mysql_select_db($database_name,$connection_mysql);
--------------
or in the simple mode might be similar below:
$connection_mysql=mysql_connect(localhost,your_database_name,your_database_password);
mysql_select_db($database_name,$connection_mysql);
i think your information is incorrect please check your entered information in db.php (also the low level Possibility is your account suspended or limited in server by admin)
Related
I am setting up my local development environment using XAMPP for writing websites using Laravel.
The issue im facing is that I cannot connect to the MySQL database with any new user I create. I give one user limited privileges for only one database and cannot connect using the correct password.
I tried making an admin user with full privileges on all databases and tables, and still cannot connect with the correct password.
The returned error is always the same -
SQLSTATE[HY000] [1045] Access denied for user 'laravel'#'localhost' (using password: YES)
and
ERROR 1045 (28000): Access denied for user 'admin'#'localhost' (using password: YES)
where laravel is the username, admin is the other one etc.
This is not related to Laravel as I keep getting this error even when I try to connect from the command line (as shown in error code number 2).
The 'anonymous' user has been removed to make sure MySQL doesn't match it by mistake, I have flushed privileges and restarted services countless times.
The default root user without password can connect, but no new users that I create with passwords can.
Solved the problem by re-installing XAMPP, nothing else.
I am getting error in PhpMyAdmin
mysqli_real_connect(): (HY000/1045): Access denied for user
'phpmyadmin'#'localhost' (using password: YES)
Connection for controluser as defined in your configuration failed.
It is not dublicate - see the error using password - YES
follow the below steops..
1. You cannot explicitly specify that a given user should be denied access. ...
2. You cannot specify that a user has privileges to create or drop tables in a database but not to create or drop the database itself.
3. A password applies globally to an account.
4. give previledge as Yes to phpmyadmin
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.
I'm a New to mysql.
I was trying to set password to 'root' account. Till then i had no problem with phpmyadmin. after setting the password i'm unable to access to db neither via phpmyadmin nor a new mysql console.
Luckly, i still had the same Mysql console open through which i set my root password. So removed the root password through the same Mysql console. it was successful. But still i'm unable to login via phpmyadmin. I get error as "#1045 - Access denied for user 'root'#'127.0.0.1' (using password: NO)".
But Logging-in via new mysql console is successful. Kind help to resolve this.
Set auth_type in phpmyadmin. (via config.inc.php)
ref: http://wiki.phpmyadmin.net/pma/Auth_types
I recommand :
auth_type = 'http'
I have created a form and it is suppose to pass three variables onto my database. I not able to submit my variables to the database, it gives me this error:
"Warning: mysqli_connect() [function.mysqli-connect]: (28000/1045): Access denied for user 'username'#'xx.xx.xx.xx' (using password: YES) in /home/simples2/public_html/insert.php on line 2
Failed to connect to MySQL: Access denied for user 'username'#'xx.xx.xx.xx' (using password: YES)
Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in /home/simples2/public_html/insert.php on line 13
Warning: mysqli_error() expects parameter 1 to be mysqli, boolean given in /home/simples2/public_html/insert.php on line 15
Error:"
I am not sure what needs to be done here. I have checked for spellings, passwords and syntax to my best of abilities which is quite less but I am not able to do.
For this, I would verify that the MYSQL database user allows that username allows connections from that ip address. It seems that the user account was setup for 'username'#localhost or the password is incorrect