Connecting to MySQL from PowerShell

3 years ago
89

Powershell Upgrade
https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-windows-powershell?view=powershell-6

MySQL Connector:
https://www.mysql.com/products/connector/

MySQL Powershell Library Files
https://github.com/adbertram/MySQL

Support the TTS Channel
https://www.tomstechshow.com/contribute/

Here is some code from the video, it can also be found in my bitbucket link below.

#MySQL Connection
Import-Module MySQL
$dbpass = ConvertTo-SecureString -String 'abcd1234' -AsPlainText -Force
$dbuser = 'admin'
$dbcred = New-Object -TypeName 'System.Management.Automation.PSCredential' -ArgumentList $dbuser, $dbpass
Connect-MySqlServer -Credential $dbCred -ComputerName 'localhost' -Database 'MyData'

How to support my channel
0 - SHARE THE VIDEO!
1 - Like videos
2 - Subscribe to my channel
3 - https://www.tomstechshow.com/contribute
4 - Twitter https://twitter.com/toms_tech_show
5 - Facebook https://fb.me/tomstechshow

Code repository
https://bitbucket.org/tomstechshow/

My photo site
http://www.thomasnelsonphotography.com

Loading comments...