In the Sql tools plugin I am at a loss on how to setup the connection parameters.
Thanks in advance for any help.
H
SQL Tools plugin: MySql connection settings
-
- Posts: 2323
- Joined: 25.08.2021 18:15
Re: MySql connection settings
In the SQL Tools, you have comments in the
cuda_sqltools_connections.json
So, copy this file to CudaText's settings dir, and uncomment what you need, then delete the rest of the comment and delete comment chars /* ... */.
cuda_sqltools_connections.json
So, copy this file to CudaText's settings dir, and uncomment what you need, then delete the rest of the comment and delete comment chars /* ... */.
Code: Select all
{
"connections": {
/*
"Generic Template": { // Connection name, used in menu (Display name)
"type" : "pgsql", // DB type: (mysql, pgsql, oracle, vertica, sqlite, firebird, sqsh)
"host" : "HOSTNAME", // DB host to connect to
"port" : PORT, // DB port
"database" : "DATABASE", // DB name (for SQLite this is the path to DB file)
"username" : "USERNAME", // DB username
"password" : "PASSWORD", // DB password (see RDMBS specific comments below)
"encoding" : "utf-8" // DB encoding. Default: utf-8
},
"Connection MySQL": {
"type" : "mysql",
"host" : "127.0.0.1",
"port" : 3306,
"database": "dbname",
"username": "user",
// use of password for MySQL is not recommended (use "defaults-extra-file" or "login-path")
"password": "password", // you will get a security warning in the output
// "defaults-extra-file": "/path/to/defaults_file_with_password", // use [client] or [mysql] section
// "login-path": "your_login_path", // login path in your ".mylogin.cnf"
"default-character-set": "utf8",
"encoding": "utf-8"
},
"Connection PostgreSQL": {
"type" : "pgsql",
"host" : "127.0.0.1",
"port" : 5432,
"database": "dbname",
"username": "anotheruser",
// password is optional (setup "pgpass.conf" file instead)
"password": "password",
"encoding": "utf-8"
},
"Connection Oracle": {
"type" : "oracle",
"host" : "127.0.0.1",
"port" : 1521,
"database": "dbname",
"username": "anotheruser",
"password": "password",
"service" : "servicename",
// nls_lang is optional
"nls_lang": "american_america.al32utf8",
"encoding": "utf-8"
},
"Connection MSSQL": {
"type" : "mssql",
// use either ("host", "port") and remove "instance"
// or ("host", "instance") and remove "port"
"host" : "localhost",
"instance": "SQLEXPRESS",
// "port" : 1433,
// "username" and "password" are optional (remove if not needed)
"username": "sa",
"password": "password",
"database": "sample",
"encoding": "utf-8"
},
"Connection SQLite": {
"type" : "sqlite",
// note the forward slashes in path
"database": "c:/sqlite/sample_db/chinook.db",
"encoding": "utf-8"
},
"Connection Vertica": {
"type" : "vertica",
"host" : "localhost",
"port" : 5433,
"username": "anotheruser",
"password": "password",
"database": "dbname",
"encoding": "utf-8"
},
"Connection Firebird": {
"type" : "firebird",
"host" : "localhost",
"port" : 3050,
"username": "sysdba",
"password": "password",
// note the forward slashes (if path is used)
"database": "c:/firebird/examples/empbuild/employee.fdb",
"encoding": "utf-8"
}
*/
},
"default": null
}
Re: MySql connection settings
Thanks för a swift answer. Now I found an Edit connection entry in the Sql tools menu. Sorry for bothering you.
H
H
-
- Posts: 2323
- Joined: 25.08.2021 18:15
Re: MySql connection settings
Ok. BTW, this plugin is not sync'ed to SublimeText plugin original, because ST version had breaking changes.