This question already has answers here:
MySQL ERROR 1045 (28000): Access denied for user 'bill'#'localhost' (using password: YES)
(43 answers)
Closed 5 years ago.
I have installed xampp on Windows and am using phpmyadmin to create a database. When I paste the link of my php file corresponding to the database onto the browser I get the following error:
Warning: mysqli_connect(): (HY000/1045): Access denied for user 'id2207666_aditijha20'#'localhost' (using password: YES) in C:\xampp\htdocs\Register2.php on line 3
I tried the 'Grant Permission' command in SQL but that didn't work either.
GRANT ALL PRIVILEGES ON id2207666_perfect_fit.* TO 'id2207666_aditijha20'#'localhost' WITH GRANT OPTION;
ERROR: #1044 - Access denied for user 'id2207666_aditijha20'#'%' to database 'id2207666_perfect_fit'
How do I fix this?
Thanks in advance
there's a difference between 'id2207666_aditijha20'#'%' and 'id2207666_aditijha20'#'localhost'
Issue your grant for the user that you're using to connect:
GRANT ALL PRIVILEGES ON id2207666_perfect_fit.* TO 'id2207666_aditijha20'#'%' WITH GRANT OPTION;
Also, you may need to flush privileges
Related
This question already has answers here:
Warning: mysqli_connect(): (HY000/1045): Access denied for user 'username'#'localhost' (using password: YES)
(25 answers)
Closed 2 years ago.
Warning: mysqli_connect(): (HY000/1045): Access denied for user 'record'#'localhost' (using password: YES) in C:\xampp\htdocs\mynk\config.php on line 7
did you create record user?
CREATE USER 'record'#'localhost';
GRANT ALL PRIVILEGES ON your_database_name.* To 'record'#'localhost' IDENTIFIED BY 'your_password';
FLUSH PRIVILEGES;
or you can change that "record" user to "root" user
reference:Create new user in MySQL and give it full access to one database
( ! ) Warning: mysqli_connect(): (HY000/1045): Access denied for user 'root'#'localhost' (using password: YES) in C:\wamp64\www\web\db.php on line 3
Call Stack
# Time Memory Function Location
1 0.0840 407896 {main}( ) ...\registration.php:0
2 0.0850 408192 require( 'C:\wamp64\www\web\db.php' ) ...\registration.php:73
3 0.0850 408192 mysqli_connect ( ) ...\db.php:3
Failed to connect to MySQL: Access denied for user 'root'#'localhost' (using password: YES)
Everything look ok, but still getting problem in connection with phpmyadmin.
It seems like you're using WAMP. WAMP's default user is root and the password is blank (unless you had changed it). You're connecting to MySQL with a password (see using password: YES), it needs to be using password: NO; meaning logging in with a blank ('') password. In \db.php:3 rewrite the MySQL password for mysqli_connect with '' and try again.
This question already has answers here:
Access denied for user 'homestead'#'localhost' (using password: YES)
(32 answers)
MySQL: Access denied for user 'test'#'localhost' (using password: YES) except root user
(18 answers)
Closed 5 years ago.
In order to create a database, I run the command in terminal:
php artisan migrate
I get this:
SQLSTATE [HY00] [1045] Access denied for user ‘dbuser’#‘localhost’ (using password: YES) (SQL: select * from information_schema.table where table_schema = blog and table_name = migrations)
I’ve ran the command php artisan config:cache and it was successful but I still can’t seem to configure phpMyAdmin to connect to database? How can I solve this error?
After making any configuration related changes in .env or to files in config directory,
You need to run:
$ php artisan config:clear
I have worked on the mysql database until yesterday, but today when I am trying to access mysql it gave following error.
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: Yes)
I want to get my existing databases since I have not got a backup.
Further, I have followed the step on following lnks and still haven't found the solution to my problem.
Resetting Permissions (MySQL)
ERROR 1045 (28000): (StackOverflow)
I tried to move a database from XAMPP to my Synology NAS.
Now I get this error:
Warning: mysqli_connect(): (HY000/1045): Access denied for user 'qs'#'localhost' (using password: YES) in /volume1/web/db.php on line 3
In the Database i created a User:
Name: qs
password: test
host: %
privileges: all..
in php i use:
$link=mysqli_connect("localhost","qs","test","qs",3306);
localhost because the Synology is the localhost of the web-page. i also tried to change to:
$link=mysqli_connect("10.0.0.99","qs","test","qs",3306);
then it says:
Warning: mysqli_connect(): (HY000/1045): Access denied for user 'qs'#'JF_SYN' (using password: YES) in /volume1/web/db.php on line 3
"JF_SYN" is the name of my Synology
i also tried to set the host of the database user, to that specific IP, but that doesn't change anything.
Database connection is working with this user and the password, i tried with HeidSQL,MSYQL-Workbench and Oracle SQL Developer, all those tools can make a connection.
I had the same issue, with my Synology NAS
Use MyAdmin and remove the “ANY” or “Anonymous” user accounts.
This should Fix your issue.