sublime-sqlexec
A Plugin for running SQL commands in Sublime Text.
Compatibility: MySQL, PostgreSQL. ,MSSQL (on Linux and OSX using SQSH)
- Julien Martin
Look for the package named PhpNamespace
.
Download the Zip file, extract it to your Sublime Text packages directory, and rename it to SQLExec
Some directories have to be defined in the PATH environment variable, according to the SGBD that you want to use: "mysql" executable for MySQL, "pgsql" executable for PostgreSQL, or "sqlplus" executable for Oracle ( Not tested ), "sqsh" executable for MSSQL (OSX and Linux)
You can also specify full path for these command in settings :
( Preferences > Package Settings > SQLExec > Settings - User )
"sql_exec.commands": {
"mysql" : "/usr/bin/mysql"
},
{
"connections": {
"Connection 1": {
"type" : "mysql",
"host" : "127.0.0.1",
"port" : 3306,
"username": "user",
"password": "password",
"database": "dbname"
},
"Connection 2": {
"type" : "mysql2",
"database": "dbname",
"loginpath": "loginpath",
},
"Connection 3": {
"type" : "mssql",
"host" : "127.0.0.1",
"port" : 1433,
"username": "user",
"password": "password",
"database": "dbname"
}
"Connection 4": {
"type" : "pgsql",
"host" : "psql.server.fr",
"port" : 5432,
"username": "anotheruser",
"password": "password",
"database": "dbname"
}
}
}
Default shortcuts are :
super+alt+e
: swhitch connectionsuper+e
super+e
: execute selected querysuper+e
super+q
: type a querysuper+e
super+s
: show tables recordssuper+e
super+d
: desc table ======= Full documentation on official site
49ce783009770d497e90b28afd29ccb9889ecdb4