You know how much I praise and like MySQL Shell but if like me,
for you too, old habits die hard, I advise you to create these
different aliases in your ~/.bashrc
(or
~/.bash_aliases
) file to force yourself to use MySQL
Shell even for a small statement check:
alias mysql="mysqlsh --sql mysql://localhost"
alias mysqlx="mysqlsh --js mysqlx://localhost"
Of course you can specify the user you want, by default it uses the same user as the system one.
For example, if this is your test machine and you want to always
use the root
account (even if not recommended), you
can specify it like this by modifying the URI:
alias mysql="mysqlsh --sql mysql://root@localhost"
Example:
So now when using mysql
MySQL Shell is launched and
it connects directly to localhost in SQL mode using the classic
protocol.
With …
[Read more]