LMSouq
general-dev Open

Access denied for user 'root@localhost' (using password:NO)

NA
Nasser Hadjloo
1 month ago
3 views
Problem Description
I'm trying to run WordPress in my Windows desktop and it needs MySQL. I install everything with `Web Platform Installer` which is provided by Microsoft. I never set a root password for MySQL and in the final step of installing WordPress, it asks for a MySQL server password. What is the default password for root (if there is one) and how to change it? I tried: mysql -u root password '123' But it shows me: Access denied for user 'root@localhost' (using password:NO) After this I try: mysql -u root -p However, it asks for a password which I don't have. --- **Update**: as Bozho suggested, I did the following: 1. I stopped the MySQL Service from Windows services 2. Opened CMD 3. Changed the location to c:\program files\mysql\bin 4. Executed the command below `mysqld --defaults-file="C:\\program files\\mysql\\mysql server 5.1\\my.ini" --init-files=C:\\root.txt` 5. The command ran with a warning about character set which I mentioned below 6. I start the MySQL service from Windows services 7. I write in the command line `mysql -u root -p` `EnterPassword: 123 // 123 was the password` 8. The command line shows the following error `Access denied for user 'root@localhost' (using password:**YES**)` How do I solve this?

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base