tulp
16th March 2006 12:06 UTC
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"`
Takhir
16th March 2006 13:30 UTC
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).
tulp
16th March 2006 14:46 UTC
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