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.

Webassembly on Ubuntu 18.04 Part 1

How to install toolchain

git clone
cd emsdk
./emsdk install latest
./emsdk activate latest

Setup Environment after Installation

You will need run this each time before your development.

source ./ --build=Release

Build and run a simple program

  • To generate a HTML page we need specify the output name with .html extension.
  • Due to cross-origin-request-sharing(CORS) is not supported by file protocol, you need run a http server for the generate html. You can use for example python3 -m http.server etc or use emrun
mkdir hello
cd hello
cat << EOF > hello.c
#include <stdio.h>
int main(int argc, char ** argv) {
  printf("Hello, world!\n");

emcc hello.c --emrun -o hello.html

emrun --no_browser --port 8080 .

Now open your browser with http://localhost:8080/hello.html and click on hello.html, you shall see webassembly code running.