MySQL Forums
Forum List  »  Security

Problem with password as a parameter to a script
Posted by: frederic eveilleau
Date: July 02, 2014 05:04AM

Hi,

I use MySQL 5.6.19 on Windows 2012 with validate_password plugin.
I need to run this script (nammed security.sql) :

>>> security.sql
UPDATE mysql.user SET Password = PASSWORD(@MDP) WHERE User = 'root';
[...]
FLUSH PRIVILEGES;
<

I call the script with this command :
mysql -uroot -e "set @MDP='%PWD%'; source security.sql;" --port=%PORT% -h localhost

>>> As a result Instance crash (service is stopped).

I found on the Application windows Logs :
"Faulting application path: D:\MySQL\MQL56\bin\mysqld.exe"

As a workaround, i change the password externaly :
mysql -u root -e "UPDATE mysql.user SET Password = PASSWORD('%PWD%') WHERE User = 'root'; source security.sql;" --port=%PORT% -h localhost

>>> i remove update password from security.sql
[...]
FLUSH PRIVILEGES;
<

So, I have to questions :
-> Is my syntax correct ?
-> Can I consider this as a BUG ? (instance crash when i run a command)

Regards,
Frederic Eveilleau

PS : My.ini contains :
#*** password security***
plugin-load=validate_password.dll
validate_password_dictionary_file=C:/forbidden_password.txt
validate_password_mixed_case_count=1
validate_password_special_char_count=1
validate_password_number_count=1
validate_password_length=10
validate_password_policy=strong

Options: ReplyQuote


Subject
Views
Written By
Posted
Problem with password as a parameter to a script
4349
July 02, 2014 05:04AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.