2

I'm just testing the VSCode MSSQL extension, I have a simple MySQL server running on docker out of this docker-compose file.

services:
  sql-server-db:
    container_name: testDB
    image: mysql
    ports: 
      - "3306:3306"
    environment:
      MYSQL_ROOT_PASSWORD: admin
      ACCEPT_EULA: "Y"

I can connect from the CLI, I can connect from the windows SQL Workbench but I cannot connect from the VSCode extension.

Error: [9:42:32 PM] Connecting to server "localhost,3306" on document "localhost,3306__root_undefined". [9:42:32 PM] Error connecting to server "localhost,3306". Details: Internal connection fatal error.

any ideas?

jabbson
  • 4,390
  • 1
  • 13
  • 23
  • I am going to be guessing wildly here, but could it be due to the fact that mysql and mssql are different flavours of databases? What EULA for mysql image? Where did this compose file came from? – jabbson Nov 26 '21 at 04:33
  • have you tried 127.0.0.1 instead of localhost, – SalindaKrish Mar 17 '22 at 11:02

1 Answers1

1

I guess you should use sql-server-db except localhost as hostname in VScode SQL connection.

  • 1
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 13 '22 at 08:54