0

I have MySQL 5.7 Community installed on Win10 and I have been using it with MySQL Workbench. Now I want to set up a replication slave and from what I found this is not possible using Workbench.

That means I have to use the Shell. According to the MySQL docs I open the Windows PowerShell (as I understand “your command interpreter”) and type the name of my database. so the line in the PowerShell looks like this:

PS C:> mysql my_database

What I get is: “mysql: the name ‘mysql’ was not recognized as the name of a Cmdlet, a function …” (this is my translation). I tried it with the path to where MySQL is installed but same output. Where is my mistake? What is missing? Would be happy if someone could give me a hint! Thanks!

2
  • have you tried .\mysql database name Commented Sep 4, 2018 at 13:40
  • mysql.exe is not in C: - open powershell, navigate to the folder where mysql.exe file is and then run mysql Commented Sep 4, 2018 at 14:16

1 Answer 1

1

You need to set mysql in your windows environment variables to use the command "mysql" in your terminal. You could also use the full path in your terminal, but it's annoying and bad for scripting

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

1 Comment

That's it! Thank you! But it was not that simple for someone who never used the Powershell. I tried the full path as well, but for some reason I did not get further than "MySQL\", it did not recognize "\MySQL Server 5.7\bin\" as part of a valid path. Does not bother me now. Thanks again

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.