4

I am trying to run MySQL from the visual studio code. I downloaded the extension called MySQL, to connect my SQL server with visual studio. After I fill out the localhost, port, username, and password, the SQL section shows me an error that is in the title above. I ran the server and created a database from the MySQL client command. However, I can't figure it out. Anyone who ran into the same problem as I am? If so, could you give me some tips to solve it? (I am basically asking how to set up the MySQL in visual studio code.) I am leaving a reference image, so that you may understand what I am trying to express here. Also how do I clear screen in MySQL in client command?enter image description here

Munkhtur B.
  • 80
  • 1
  • 5

1 Answers1

14

I had the same problem. in order to solve it, try to use on your MySQL client:

ALTER USER '<your_user>'@'localhost' IDENTIFIED WITH mysql_native_password BY '<your_password>'

Like this:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '1234'

Then try the connection again no VS Code! That solved for me.

Roberto Caboni
  • 7,252
  • 10
  • 25
  • 39
Gui Reis
  • 436
  • 4
  • 11