Find file
Fetching contributors…
Cannot retrieve contributors at this time
315 lines (223 sloc) 10.9 KB
Some details about ocelotgui options.
An option is a named value which affects connecting and behavior.
Most Ocelot options are very similar to options of the mysql client.
The places that an option might be specified are:
within the program for example the default port value is 3306,
in an environment variable for example "export MYSQL_TCP_PORT=3306",
in a configuration file for example "port=3306" in $HOME/.my.cnf,
on the command line for example "./ocelotgui --port=3306",
or on the File|Connect dialog box.
Environment Variables
The ocelotgui program will look at these variables:
Option Files
The ocelotgui program will look in these option files:
/etc/my.cnf, /etc/mysql/my.cnf, [SYSCONFDIR]/my.cnf,
[defaults-extra-file], $HOME/.my.cnf, $HOME/.mylogin.cnf.
Within option files, the ocelotgui program will look
in these groups: [client] [mysql] [ocelot], as well
as groups specified by MYSQL_GROUP_SUFFIX.
Command Line
The ocelotgui program will look at command-line arguments
which are specified in short form such as "-p 3306", or
which are specified in long form such as "--port=3306".
Dialog Box
A dialog box will appear if the user enters a user statement
"CONNECT;" or if the user chooses menu item File|Connect.
The user will be advised to do this at startup time if an
initial attempt to connect fails.
The default value for "port" is 3306, this is
hard coded in the ocelotgui source.
The environment variable value for "port" is 3307, this is
set by "export MYSQL_TCP_PORT=3307" before starting ocelotgui.
The option file value for "port" is 3308, this is
set by putting "PORT=3308" in the [mysql] group in
the $HOME/.mysql.cnf file.
The command-line value for "port" is 3309, this is
set by putting "--port=3309" on the command line
when starting the ocelotgui program.
The dialog-box value for "port" is 3310, this is
set by choosing File|Connect, entering "3310" in
the widget labelled "Port", and clicking "OK".
The ocelotgui program reads the settings in the
above order, therefore the port number is 3310.
The Options
Options in the following list are in the same order that one sees
on the File|Connect dialog box: first come the 8 important connect
options (host, port, user, database, socket, password, protocol,
init_command), then all the other options in alphabetical order.
Unless otherwise stated, options are specifiable by saying
[option_name] = [value] in an option file or
--[option_name] = [value] on the command line
(sometimes --[option_name] alone is sufficient for true|false values),
or in the dialog box.
If an option value is irrelevant or invalid, the ocelotgui program
ignores it without displaying an error message.
host: Server address. Specifiable with MYSQL_HOST
environment variable, with host= in an option file, with
-h or --host on the command line, or in dialog box.
Example values: localhost
Warning: if host=localhost, ocelotgui tries to use a socket,
if this is not desirable then say localhost= instead.
port: Port that the server listens on, if the protocol is
TCP. Specifiable with
MYSQL_TCP_PORT environment variable, with port= in an option
file, with -P or --port on the command line, or in dialog box.
Example values: 3306 3307.
user: User name. Specifiable with user= in an option file,
with -u or --user on the command line, or in dialog box.
Example values: root guest jsmith.
database: Database name also known as schema name. Specifiable
with database= in an option file, with -D or --database on the
command line, or in dialog box. Example values: test account_data.
socket: Socket name that the server receives on, if the
protocol is SOCKET. Specifiable with socket= in an option file,
with -S or --socket= on the command line, or in dialog box.
Examples: var/lib/special.sock /home/user/x.sock.
password: Password associated with the user. Specifiable
with password= in an option file, with -p or --password= on
the command line, or in dialog box. If the password is
required but not specified, the dialog box will always appear.
Examples: sesame top_secret#1
protocol: How the connection to the server occurs. Possible
values are: blank or TCP or SOCKET. If host=localhost and
protocol is blank, then SOCKET is assumed. Specifiable with
protocol= in an option file, with --protocol= on the command
line, or in dialog box. Examples: tcp socket.
init_command: Initial statement that should be executed as
soon as connect is complete. Example: "select current_user()".
auto_rehash. If 1 (true), ocelotgui may try to
complete names.
auto_vertical_output. If 1 (true), ocelotgui will display
with one column per row.
batch. Mostly ignored, but if 1 (true), history is not written.
compress. If 1 (true), value is passed to the server.
connect_expired_password. If 1 (true), ocelotgui goes into
sandbox mode if a password has expired at connect time.
connect_timeout. Ignored.
debug. Ignored.
debug_check. Ignored.
debug_info. Ignored.
default_auth. Ignored.
default_character_set. Ignored, ocelotgui needs UTF-8.
defaults_extra_file. Name of an additional option file.
defaults_file. Ignored.
defaults_group_suffix. Suffix that is added to the regular group
names for option files. For example, if defaults_group_suffix=_X,
then ocelotgui will look at options in groups client_X and mysql_X and
ocelot_X in addition to options in groups client and mysql and ocelot.
delimiter. What ends a statement, usually semicolon ";".
enable_cleartext_plugin. Ignored.
execute. String to execute followed by program exit.
force. Ignored, ocelotgui always ignores errors in options.
help. Display a help message followed by program exit.
histfile. Name of file where statements are logged to, usually
".mysql_history". Ignored if batch=1. Ignored if
histignore. Pattern to ignore when writing to histfile.
For example, if histignoreis "*select*", then statements
containing the string "select" will not be written.
html. If one starts ocelotgui with --html, the grid display
will be based on HTML rather than on widgets, making results
look quite different. If one starts ocelotgui with --html --raw,
the actual html markup code will appear.
ignore_spaces. Ignored.
ld_run_path. Where to look for Click help|libmysqlclient
for details.
line_numbers. Ignored.
local_infile. If 1 (true), passed to the server.
login_path. Where to find login file if it's not "~/.mylogin.cnf".
max_allowed_packet. Passed to the server. Default 16777216.
max_join_size. Passed to the server. Default 1000000.
named_commands. Ignored.
net_buffer_length. Passed to the server. Default 16384.
no_beep. Ignored, ocelotgui does not usually beep when errors occur.
no_defaults. If 1 (true), options in environment variables and option
files are read but not used.
ocelot_* ... Options that begin with "ocelot_" are only recognized
by the ocelotgui client. Everything on the Settings menu has an
associated option name. The intuitively-named settings options are:
ocelot_extra_rule_1_text_color ocelot_extra_rule_1_background_color
ocelot_extra_rule_1_condition ocelot_extra_rule_1_display_as
ocelot_grid_text_color ocelot_grid_background_color
ocelot_grid_border_color ocelot_grid_header_background_color
ocelot_grid_font_size ocelot_grid_font_style
ocelot_grid_font_weight ocelot_grid_cell_border_color
ocelot_grid_cell_drag_line_color ocelot_grid_border_size
ocelot_grid_cell_border_size ocelot_grid_cell_drag_line_size
ocelot_history_text_color ocelot_history_background_color
ocelot_history_border_color ocelot_history_font_family
ocelot_history_font_size ocelot_history_font_style
ocelot_history_font_weight ocelot_menu_text_color
ocelot_menu_background_color ocelot_menu_border_color
ocelot_menu_font_family ocelot_menu_font_size
ocelot_menu_font_style ocelot_menu_font_weight
ocelot_statement_text_color ocelot_statement_background_color
ocelot_statement_border_color ocelot_statement_font_family
ocelot_statement_font_size ocelot_statement_font_style
ocelot_statement_font_weight ocelot_statement_highlight_literal_color
ocelot_statement_highlight_identifier_color ocelot_statement_highlight_comment_color
ocelot_statement_highlight_operator_color ocelot_statement_highlight_keyword_color
ocelot_statement_prompt_background_color ocelot_statement_highlight_function_color
See also: the ocelot_ options which aren't related to Settings, below.
ocelot_client_side_functions: ocelot_client_side_functions=0 turns off
the client-side functions, such as "select row_number() over ...".
This may be unnecessary with newer versions of MariaDB.
The default is 1.
ocelot_dbms: --ocelot_dbms=x means assume the server DBMS is x
until connection is made. The possible values are 'mysql',
'mariadb', and 'tarantool'. The default is 'mysql'.
ocelot_grid_tabs: ocelot_grid_tabs=5
means assume that a stored procedure can return up to 5 result sets.
The default is 16.
ocelot_language: --ocelot_language='english' means the menu and the
client error messages should be in English, --ocelot_language='french'
means the menu and the client error messages should be in French.
The default is 'english'.
ocelot_statement_syntax_checker: setting
ocelot_statement_syntax_checker=1 turns on the
syntax checker; setting ocelot_statement_syntax_checker=2
turns on the syntax checker and is insistent -- if ocelotgui
doesn't like the syntax checker, a confirmation dialog box
will appear. The default is 1.
one_database. Ignored.
pager. Ignored.
pipe. Ignored.
plugin_dir. Ignored.
print_defaults. If 1 (true), ocelotgui displays defaults and exits.
prompt. What to display on left of statement lines.
Default is "mysql>".
The prompt can include special character sequences
for date, time, and line number.
quick. Ignored.
raw. Ignored.
reconnect. Ignored.
safe_updates. If 1 (true), ocelotgui passes 1 to the server.
secure_auth. If 1 (true), ocelotgui passes 1 to the server.
select_limit. The maximum number of rows to select; default is 0
which means infinity; ocelotgui passes this to the server.
server_public_key. Ignored.
shared_memory_base_name. Ignored.
show_warnings. If 1 (true), ocelotgui displays warnings which
result from problems that the server detects.
sigint_ignore. If 1 (true), ocelotgui will not stop statements
when user types control-C or chooses the menu item Run|Kill.
silent. Ignored.
ssl, ssl_ca, ssl_capath, ssl_cert, ssl_cipher, ssl_crl,
ssl_crlpath, ssl_key, ssl_verify_server_cert. SSL options
are accepted and passed to the server.
syslog. Ignored.
table. Ignored.
tee. Name of a file to dump statements and results to.
unbuffered. Ignored.
verbose. Ignored.
version. If 1 (true), ocelotgui displays a version number and exits.
vertical. If 1 (true), results are displayed with one column
per line.
wait. Ignored.
xml. If one starts with ocelotgui --xml, the grid display will
show raw xml. See also --html.