Windows – How to run thesql prompt in windows powershell ISE

MySQLpowershellwindows

I want to use PowerShell ISE tab to be able to connect mysql client and tun sql statements, however as soon as I connect to client using following command –

>mysql.exe --defaults-file=<abc.xnf> --datadir=<xyz> 

mysql prompt doesn't appear instead console behaves as a continuous process running. Does anyone know how can get mysql prompt ?

Best Answer

Unfortunately, the ISE is not a full-on console host, and does not handle interactive console applications properly. If you try to run a built-in interactive console app, like netsh.exe, you'll get an error like this:

Cannot start "netsh". Interactive console applications are not supported. 
To run the application, use the Start-Process cmdlet or use "Start PowerShell.exe" from the File menu.
To view/modify the list of blocked console applications, use $psUnsupportedConsoleApplications, or consult online help.

Other commands, like mySQL, will just hang indefinitely, since the ISE cannot properly handle user input to the application. You can read more about this limitation here: PowerShell Team blog.