0

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. Commented Nov 1, 2017 at 10:08
  • I just need to the proper update query syntax of mysql using powershell script Commented Nov 1, 2017 at 10:11

2 Answers 2

1

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

Sign up to request clarification or add additional context in comments.

2 Comments

No we have added module..thats why we are able to run the scripts
Get-Module -ListAvailable ----- to check if the module is imported. If it is giving you that error message, it means that the cmdlet is not there.
0

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?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.