Mysqli_real_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: NO)
Mysqli_real_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: NO)
I'm using xampp. I also downloaded MySQL Database.
Then I have created a database with Mysql Database, with
Then I start Xampp Apache and Mysql.
When I try to connect to localhost:8080/phpmyadmin, I receive this kind of error:
Messaggio di MySQL: Documentazione
Impossibile connettersi: impostazioni non valide.
mysqli_real_connect(): (HY000/1045): Access denied for user
'root'@'localhost' (using password: NO)
phpMyAdmin ha provato a connettersi al server MySQL, e il server ha
rifiutato la connessione. Si dovrebbe controllare il nome dell'host,
l'username e la password nel file di configurazione ed assicurarsi che
corrispondano alle informazioni fornite dall'amministratore del server
MySQL.
So I think that I should modify the file:config.inc.php
but the problems are:
config.inc.php
Can you help me to solve this problem? I need to create a simple login form in Java and I need the connection with a database (maybe you know some other solutions to do this.)
Thank you.
1 Answer
1
Please, execute the following privileges command on your MySQL Server:
GRANT ALL ON *.* TO `root`@`localhost` IDENTIFIED BY '123456789';
GRANT ALL ON *.* TO `root`@`127.0.0.1` IDENTIFIED BY '123456789';
Did it solve your problem?
Cheers,
root
localhost
root
127.0.0.1
When i insert your code i receive this error: GRANT ALL ON . TO
root
@127.0.0.1
IDENTIFIED BY '123456789'; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY '123456789'' at line 1– Keyz23
Jul 1 at 20:23
root
127.0.0.1
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Hi thanks for your answer, can you follow me just another time? I open terminal, and i write: /usr/local/mysql/bin/mysql -uroot -p Then I should paste : GRANT ALL ON . TO
root
@localhost
IDENTIFIED BY '123456789'; GRANT ALL ON . TOroot
@127.0.0.1
IDENTIFIED BY '123456789';– Keyz23
Jul 1 at 17:43