Set MySQL root password with command prompt on WampServer
I have installed WampServer Version 2.5 on my computer. I have been trying to set the MySQL root password using command prompt but it will not recognize my commands.
When I type the following:
mysqladmin -u root status
I get the following error:
'mysqladmin' is not recognized as an internal or external command, operable program or batch file.
I was following online directions, in order to add the MySQL command prompt in WampServer to my Windows system path, and I think I did it right.
I also did a command line search for the 'mysqld.exe' file using
'dir mysqld.exe /s /p'
and I did not get any directory path.
You should navigate in command prompt to the folder where is mysqladmin file. Try to find it with Find interface in Windows. Then try to mysqladmin -u root status or whatever you need.
Then you can add it's path to system variables, so it could be reached from every folder in command prompt.
You can add a password to the root through mysqladmin.exe.
This executable is usually inside <wamp path>\bin\mysql\mysqlx.x.x\bin
Call the executable with the following parameters.
mysqladmin -u root password rootpassword