Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resources that use mysql.exe fail due to password warnings generating false error output #17

Open
andy1547 opened this issue Apr 6, 2017 · 0 comments
Labels
bug The issue is a bug. in progress The issue is being actively worked on by someone.

Comments

@andy1547
Copy link

andy1547 commented Apr 6, 2017

In MySQL 5.6.35 I get this error when trying to ensure a database is absent:

writeErrorStream      : True
Exception             : System.Management.Automation.RemoteException: Warning: Using a password on the command line 
                        interface can be insecure.
TargetObject          : Warning: Using a password on the command line interface can be insecure.
CategoryInfo          : NotSpecified: (Warning: Using ...an be insecure.:String) [], RemoteException
FullyQualifiedErrorId : NativeCommandError
ErrorDetails          : 
InvocationInfo        : System.Management.Automation.InvocationInfo
ScriptStackTrace      : at Invoke-MySqlCommand, C:\Program 
                        Files\WindowsPowerShell\Modules\xMySql\2.1.0.0\MSFT_xMySqlUtilities.psm1: line 31
                        at Get-TargetResource, C:\Program Files\WindowsPowerShell\Modules\xMySql\2.1.0.0\DscResources\MS
                        FT_xMySqlDatabase\MSFT_xMySqlDatabase.psm1: line 31
                        at Test-TargetResource, C:\Program Files\WindowsPowerShell\Modules\xMySql\2.1.0.0\DscResources\M
                        SFT_xMySqlDatabase\MSFT_xMySqlDatabase.psm1: line 119
PipelineIterationInfo : {0, 0}
PSMessageDetails      : 

If I comment out Read-ErrorFile in both set and get resource I no longer get the error, it appears the standard error output contains these warning messages.
See http://stackoverflow.com/questions/20751352/suppress-warning-messages-using-mysql-from-within-terminal-but-password-written for suggested work arounds for this.

Exporting the MYSQL_PASSWORD variable works as temporary solution, can anybody think of a better workaround?

@johlju johlju added bug The issue is a bug. in progress The issue is being actively worked on by someone. labels May 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug. in progress The issue is being actively worked on by someone.
Projects
None yet
Development

No branches or pull requests

2 participants