If like me you are using MySQL Shell on many different systems and new
installations, there are some commands I often use to benefit
from my environment.
What I really want to enable is the history of course, a nicer
prompt and sometimes the default mode I want to use.
This blog post is just a little reminder with those commands I
usually repeat in all my systems:
mysql-js> shell.options.setPersist('history.autoSave', 1)
mysql-js> shell.options.setPersist('history.maxSize', 5000)
The option above is when using MySQL Shell in JS mode which is
the default. To play with options using the same command in every
mode (JS, Python, SQL), you can use /option like:
\option --persist history.autoSave 1
Then I set the prompt to have something like this:
$ cp /usr/share/mysqlsh/prompt/prompt_256pl+aw.json …
[Read more]