reset root mysql on windows
-
29-04-2021 - |
Pregunta
Following the recommended instructions for resetting root at link and the other recommendations here at stackoverflow. I tried to reset my root pass both ways suggested, with and without the --defaults-file option
First I tried.
"C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld" –init-file=C:\\mysql-init.txt --console
Error:
C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld: Too many arguments (first extra is 'ûinit-file=C:\mysql-init.txt').
Next I tried
"C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld" --defaults-file="C:\\ProgramData\\MySQL\\MySQL Server 5.5\\my.ini" MySQL55 –init-file=C:\\mysql-init.txt --console
Error:
C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld: Too many arguments (first ex tra is 'MySQL55').
'Too many arguments' makes me think my syntax is the problem
Solución
Look at your command lines again and manually delete the LONG HYPHENS. Then type the hyphens in again manually.
"C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld" –init-file=C:\mysql-init.txt --console
should be
"C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld" --init-file=C:\mysql-init.txt --console
(notice the hyphens before init-file
)
Refer to mysqld options
Otros consejos
- I uninstalled the MySQL server.
- I went to the mysql folder, and erased everything (the folder too).
- Reboot the PC.
- Reinstall the MySQL.
- Set the new password.