CLI - mycli
output to file once:
\o -o /tmp/f.csv
CSV format of data:
\T csv
example
\T csv
\o /tmp/data.csv
SELECT first_name, last_name, email FROM employees;
plain output
\T plain
with header
\T minimal
just list of stuff without header
List of output formats:
\T
emp_db> \copy (SELECT first_name, last_name, email FROM employees) TO '/tmp/data.csv'
list all available credentials:
mysql_config_editor print —all
add new credentials:
mysql_config_editor set --login-path=LOGIN_PATH --host=HOST --user=USER --password
remove credentials:
mysql_config_editor remove -—login-path=LOGIN_PATH
mysql_config_editor
creates and maintains encrypted ~/.mylogin.cnf
use credentials:
mysql --login-path=os-prod-orig dbname