To work with mysql, we normally use the default mysql client:
mysql -u mysql_user -p
However mysql does not have auto-completion which could be very helpful. You can use mycli to do that.
pip3 install --user mycli
mycli -u mysql_user
Unfortunately mycli does not support keywords and JSON functions from newer mysql 5.7 and mysql 8.
You can install mysqlsh which supports all those auto-completion, new keywords and JSON function for both Mysql 5.7 and 8.0.
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install mysql-shell
mysqlsh -u mysql_user # default
# default will be running javascript shell, same as mysqlsh --js
mysqlsh --py -u mysql_user # running python shell
mysqlsh --sql -u mysql_user # running SQL mode
The key here is that, mysqlsh –sql is a much better alternative to either mysql client or mycli. You can switch among Javascript, Python and SQL on the fly by typing \js, \py, \sql after started mysqlsh.