Giter Club home page Giter Club logo

Comments (7)

bendilley avatar bendilley commented on August 23, 2024 2

Adding "password": "" to the connection properties worked for me too. Thanks @nicobrenner!

from sublime-sqlexec.

jum4 avatar jum4 commented on August 23, 2024

Did you chose a connection using ctrl+alt+e ?

from sublime-sqlexec.

joiner3710 avatar joiner3710 commented on August 23, 2024

yeah i already use ctrl+alt+e, but i saw the problem, i was using version 2 and the plugin works with version 3, i am using it without problem just now, thank you for the plugin, its very nice

from sublime-sqlexec.

JamesCrittenden avatar JamesCrittenden commented on August 23, 2024

Has anyone figured out a solution for this? The no active connection error still pops up

from sublime-sqlexec.

bendilley avatar bendilley commented on August 23, 2024

I've installed sqlexec using package manager on sublime build 3083 and I'm sure I've set up and selected my pgsql connection correctly (from the list of two valid connections), along with a working ~/.pgpass (I can connect via psql in cmd), yet I still get "No active connection" pop up for every attempt to execute.

I've also tried setting "sql_exec.debug": true, but that doesn't seem to be any more verbose, and an absolute path to psql, but that hasn't worked either. Below is my current SQLExec.sublime-settings with a couple of name changes (the latter connection is an ssh tunnel):

{
  "sql_exec.debug": true,
  "sql_exec.commands": {
    "pgsql": "/usr/local/bin/psql"
  },
  "connections": {
    "ssnext@dev": {
      "type": "pgsql",
      "host": "localhost",
      "port": 5432,
      "username": "foo",
      "database": "bar"
    },
    "ssnext@qa": {
      "type": "pgsql",
      "host": "localhost",
      "port": 5433,
      "username": "foo",
      "database": "bar2"
    }
  }
}

Can you see something I can't?

from sublime-sqlexec.

Skoffer avatar Skoffer commented on August 23, 2024

I have the same issue. My file looks like this:

{
    "sql_exec.debug": true,
    "sql_exec.commands": {
        "mysql"  : "mysql",
        "pgsql"  : "psql",
        "oracle" : "sqlplus",
        "vertica": "vsql"
    },
    "connections": {
        "Conn1":   {
                         "type"    : "pgsql",
                         "host"    : "127.0.0.1",
                         "port"    :  5432,
                         "username": "postgres",
                         "database": "postgres"
                        }
    }
}

from sublime-sqlexec.

nicobrenner avatar nicobrenner commented on August 23, 2024

The connection worked fine from the command line:

psql -U nico development_database

Was getting the same error message without any additional details.

The problem is that despite not needing a password for the connection, the configuration file needs to have a password field, otherwise the plugin throws an error in the console when selecting the connection.

Changed my config file to this:

{
  "connections": {
    "Dev DB": {
      "type"    : "pgsql",
      "host"    : "127.0.0.1",
      "port"    : 5432,
      "username": "nico",
      "password": "",
      "database": "development_database"
    }
  }
}

But then got this error:

/bin/sh: psql: command not found

Which is solved here: #17

Config file now looks like this:

{
  "sql_exec.commands": {
    "pgsql" : "/usr/local/bin/psql"
  },

  "connections": {
    "Dev DB": {
      "type"    : "pgsql",
      "host"    : "127.0.0.1",
      "port"    : 5432,
      "username": "nico",
      "password": "",
      "database": "development_database"
    }
  }
}

Note: installed Postgres using Homebrew

from sublime-sqlexec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.