rd42 rd42 - 2 months ago 16
MySQL Question

reset root mysql on windows

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

Answer

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

Comments