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:
I stopped the MySQL Service from Windows services
Opened CMD
Changed the location to c:\program files\mysql\bin
Executed the command below
mysqld --defaults-file="C:\\program files\\mysql\\mysql server 5.1\\my.ini" --init-files=C:\\root.txt
The command ran with a warning about character set which I mentioned below
I start the MySQL service from Windows services
I write in the command line
mysql -u root -p
EnterPassword: 123 // 123 was the password
The command line shows the following error
Access denied for user 'root@localhost' (using password:**YES**)
How do I solve this?
You can reset your root password. Have in mind that it is not advisable to use root without password.