0

I am trying to READ some rows from a local mysql database but I cannot. I have tried to install MysqlCmlets with the following command:

 Install-Module -Name MySQLCmdlets

A yellow progress bar appears at the top and then it seems to finish/stop running with no errors, warnings or questions. I then try to use MySQL commands such as "Connect-MySqlServer" and I get the error:

The term 'Connect-MySqlServer' is not recognized as the name of a cmdlet, function, script file,
or operable program.

I restarted powershell after installing, I even restarted my computer and it doesnt works. The "MySQL" folder is in C:\Program Files\WindowsPowerShell\Modules and it contains the proper files such as "Connect-MySqlServer". I also checked and "PsModulePath" has that path properly set as well. I also tried to run the install with -Force and to use an msi file from adata to install it, yet powershell keeps giving me the same error.

As suggested in another post I also tried

Set-ExecutionPolicy RemoteSigned

And installed again and still no go.

1 Answer 1

1

Did you tried to import the module after installing it. i.e.

Import-module MySQLCmdlets

By default Starting in PowerShell 3.0, installed modules are automatically imported to the session when you use any commands or providers in the module. However, you still need to use the Import-Module command to import a module if you disableld automatic module importing using the $PSModuleAutoloadingPreference preference variable.

Reference: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/import-module?view=powershell-5.1

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

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.