0
votes

I'm trying to run the update query after running the mysql scripts in mysql db using powershell script, below mentioned query i am trying

Invoke-MySqlQuery -Query "UPDATE $DataBase.tablename SET account=$Storageacc,primary_key = $StorageKey,blob_container= $Container WHERE id = 1 and name = 'testing'"

when i run the above query using powershell script iam getting below error

The term 'Invoke-MySqlQuery' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again

2
even i tried another way as well :- run-MySQLQuery -ConnectionString "$Connectionstring" -Query "UPDATE $DataBase.tablename SET account=$Storageacc,primary_key = $StorageKey,blob_container= $Container WHERE id = 1 and name = 'testing'" still iam getting error ##[error]The term 'run-MySQLQuery' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.Sandeep
I just need to the proper update query syntax of mysql using powershell scriptSandeep

2 Answers

0
votes

You are missing module or software which is needed to interact with Powershell. Please check this: Querying MySQL Database with Powershell

0
votes

The error means the module is either not installed/present on your machine or has not been imported into the powershell session.

What does Get-Module display?