Django Mysql Command Not Found Powershell VSCODE

Hi Everyone, I wanted to use Mysql with the powershell on VSCode, but when I ran the “MySQL -u root -p” command, it showed up like this:

I already added the MySQL path in Windows’ environment variable and still got the error…

But when I ran the “MySQL -u root -p” on CMD, it worked just fine…

Any idea how to solve this? Thank you

Even I’m facing this same issue. If you have figured out a way, kindly let me know in the comment section.

Have anyone got the solution for this issue? I’m facing the same issue. :frowning:

I think the solution is, to go back to python 3.9. As in MySql documentation MySQL :: MySQL Connector/Python Release Notes :: Changes in MySQL Connector/Python 8.0.27 (2021-10-19, General Availability), it is mentioned that python 3.10 is not supported, it is a known limitation.

If you have already added the MySQL path in Windows environment variable, please execute the command “mysql -u root -p” in Command prompt and see if it works there. If it’s prompting you to enter a password that would mean you have done the right thing.

Close visual studio- Restart it- open your storefront folder and you can try running the command in the terminal. It will work once you have restarted Visual studio :slight_smile:

No, we know that…
it DOESN’T work… that’s the point of this post.
Your answer doesn’t help at all.

So I just spent the last hour on this issue.
The solution is correct, BUT you HAVE to add the path as NEW after you clicked on EDIT.

So first EDIT the path (this is a must. Select the path and click on edit)

And then click on new, and then paste the path:

The python version seems to not be relevant here, I am using v3.11.

My 2 mistakes were to think that it’d work if:

  • I just add a new path without modifying the path first
  • or pasting the path to the end of the path
    Both of these did not work for me.