Archive: MySQL admin problem


MySQL admin problem
Dear frends,

I still fithing with the password problem on mysql.
I found a new command with mysqladmin to set my root password.

I tryed the following commands in NSIS without any results:


ExecWait '$INSTDIR\MySQL\bin\mysqladmin --user=root --password= password "newpass"'

ExecWait '$INSTDIR\MySQL\bin\mysqladmin --user=root --password="" password "newpass"'


ExecWait '"$INSTDIR\MySQL\bin\mysqladmin" --user=root --password= password "newpass"'

ExecWait '"$INSTDIR\MySQL\bin\mysqladmin" --user=root --password="" password "newpass"'

Exec '"$INSTDIR\MySQL\bin\mysqladmin.exe" --user=root --password="" password "newpass"'

ExecWait `"$INSTDIR\MySQL\bin\mysqladmin" --user=root --password= password "newpass"`


mysqladmin with ExecCmd
With 4.2 I not found command line variant for password. And mysqladmin supports redirection in simple cases only (like /?), but attached sample with WM_CHAR stdin worked in my tests. I also included dll version with Sleeps, so you can see real-time input in the /TEST mode. Plug-in compatibility: 2000-XP and later. Change SQL_PATH definition in the included sample.
Any case do not forget to use 'exe' at the end of binary name (your ExecWait samples).


Thank you for the reply Takhir,
I implement the code like this:

ExecCmd::exec /TIMEOUT=5000 /TEST '"$INSTDIR\MySQL\bin\mysqladmin.exe" -p -uroot reload' "Mynew$\r$\n"
Pop $0 # return value - process exit code or error or still running.

It run the process. But If I try to login in my mysql account, it still gives the old password.
I think that the commands I give are correct, but the problem is anywhere else.
I use MySQL 5.0