May
May

Reputation: 3

Why is this command not working in Windows PowerShell?

I am attempting to connect between Windows PowerShell and MySQL.

Why am I receiving this error from the Windows PowerShell?

mysql -e "CREATE DATABASE mydb;" -u root -p
mysql : The term 'mysql' 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.
At line:1 char:1
+ mysql -e "CREATE DATABASE mydb;" -u root -p
+ ~~~~~
    + CategoryInfo          : ObjectNotFound: (mysql:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

I tried copy-pasting the command mysql -e "CREATE DATABASE mydb;" -u root -p into the Windows PowerShell.

I expected for a database to appear in MySQL.

I only received an error.

Upvotes: 0

Views: 67

Answers (0)

Related Questions