Smith Smith - 3 months ago 29
MySQL Question

inno setup giving error code 2 with mysql setup

I am executing this line in inno setup, but i am getting and exit code 2

;Setting root password default root (blank). ex : mypass4u@
Filename: "{app}\mysql\bin\mysqladmin.exe"; \
Parameters: "-u root -e ""update mysql.user set password=PASSWORD('mypass4u@') where user='root';"""; \
StatusMsg: "Setting password root"; \
Flags: runhidden;


I get the following message in the debug window


[11:56:54.387] -- Run entry -- [11:56:54.392] Run as: Current user
[11:56:54.396] Type: Exec
[11:56:54.400] Filename: C:\Program Files (x86)\Company\Myapp\mysql\bin\mysqladmin.exe
[11:56:54.405] Parameters: -u root -e "update mysql.user set
password=PASSWORD('mypass4u@') where user='root';"

[11:56:54.758] Process exit code: 2


What could be causing this error

Answer

I assume you wanted to use mysql.exe, not mysqladmin.exe.

Comments