I'm trying to change the root password in MySQL on my development machine (I've just installed MySQL, so it currently doesn't have a password), but it keeps failing with the following error message:
The system cannot find the file specified.
I'm using MySQL 5.1.70 (x86, 32-bit) on Windows 7 SP1 (64 bits). I've added MySQL's "bin" directory to my "Path" environment variable.
In the comments of the MySQL documentation, I read that I should have installed the service using the absolute path, so I stopped MySQL, and uninstalled it:
C:\Windows\system32>mysqld --remove
Service successfully removed.
Then I installed it again, using the absolute path this time:
C:\Windows\system32>C:\web\mysql-5.1.70\bin\mysqld.exe --install
Service successfully installed.
I started MySQL, and tried to change the password again:
C:\Windows\system32>mysqladmin -u root password Pe%8XiduwOqdZ<ZFE5!
The system cannot find the file specified.
I also tried with quotes:
C:\Windows\system32>mysqladmin -u root password 'Pe%8XiduwOqdZ<ZFE5!'
The system cannot find the file specified.
I also tried to change the current directory to MySQL's "bin" directory:
C:\Windows\system32>cd C:\web\mysql-5.1.70\bin
C:\web\mysql-5.1.70\bin>mysqladmin -u root password Pe%8XiduwOqdZ<ZFE5!
The system cannot find the file specified.
C:\web\mysql-5.1.70\bin>mysqladmin -u root password 'Pe%8XiduwOqdZ<ZFE5!'
The system cannot find the file specified.
What's wrong?