id = "mysql"
name = "MySQL"
homepage = "https://dev.mysql.com/doc/refman/8.4/en/mysql.html"
description = "mysql is a simple SQL shell with input line editing capabilities."
icon = "SimpleIcons:mysql"
executables = ["mysql"]
[dotfiles]
paths = ["~/.my.cnf"]
exclude = ["~/.mysql_history"]
secret = [
"~/.mylogin.cnf",
"%APPDATA%/MySQL/.mylogin.cnf",
]
side_effect = false
[[dotfiles.secret_paths]]
file = "~/.my.cnf"
match = { prefix = ["password"] }
[[dotfiles.machine_lines]]
file = "~/.my.cnf"
match = { prefix = ["socket"] }
scope = "platform"
[commands]
format = 1
label = "Connect to a server"
description = "Open the mysql client or run one statement. Passwords are left out; use -p at the prompt, a login path or an option file. SSL and compression tuning are left out."
quality = "ai-draft"
base = "fig:mysql"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false }
[[commands.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/mysql.ts"
license = "MIT"
[[commands.field]]
id = "host"
label = "Host"
type = "string"
option = ["--host", "-h"]
sources = ["fig"]
[[commands.field]]
id = "port"
label = "Port"
type = "integer"
option = ["--port", "-P"]
sources = ["fig"]
[[commands.field]]
id = "user"
label = "User"
type = "string"
option = ["--user", "-u"]
sources = ["fig"]
[[commands.field]]
id = "database"
label = "Database"
type = "string"
option = ["--database", "-D"]
sources = ["fig"]
[[commands.field]]
id = "execute"
label = "Execute statement and quit"
type = "string"
option = ["--execute", "-e"]
sources = ["fig"]
[[commands.field]]
id = "login_path"
label = "Login path"
type = "string"
option = ["--login-path"]
sources = ["fig"]
[[commands.field]]
id = "protocol"
label = "Protocol"
type = "string"
option = ["--protocol"]
suggestions = [{ value = "TCP", label = "TCP" }, { value = "SOCKET", label = "SOCKET" }, { value = "PIPE", label = "PIPE" }, { value = "MEMORY", label = "MEMORY" }]
sources = ["fig"]
[[commands.field]]
id = "table"
label = "Tabular output"
type = "boolean"
option = ["--table", "-t"]
sources = ["fig"]
[[commands.field]]
id = "vertical"
label = "Vertical output"
type = "boolean"
option = ["--vertical", "-E"]
sources = ["fig"]
[[commands.field]]
id = "batch"
label = "Batch mode"
type = "boolean"
option = ["--batch", "-B"]
sources = ["fig"]
[[commands.field]]
id = "skip_column_names"
label = "Skip column names"
type = "boolean"
option = ["--skip-column-names", "-N"]
sources = ["fig"]
[[commands.field]]
id = "force"
label = "Continue after SQL errors"
type = "boolean"
option = ["--force", "-f"]
sources = ["fig"]
[[commands.field]]
id = "safe_updates"
label = "Safe updates"
type = "boolean"
option = ["--safe-updates", "-U"]
sources = ["fig"]
[[commands.field]]
id = "charset"
label = "Default character set"
type = "string"
option = ["--default-character-set"]
sources = ["fig"]
[[commands.task]]
id = "connect"
label = "Connect"
fields = ["host", "port", "user", "database"]
required = []
[[commands.task]]
id = "query"
label = "Run one statement"
fields = ["host", "user", "database", "execute", "table"]
required = ["execute"]
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["host", "port", "user", "database", "execute"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["login_path", "protocol", "table", "vertical", "batch", "skip_column_names", "force", "safe_updates", "charset"]