Node.js MySQL example will not start wihout running the following code in MySQL Database container. So, run the following command in terminal. If your Node.js app still doesn't connect, then try other options.
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'your_root_password';
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_root_password';
Run the following script for normal user.
ALTER USER 'foo'@'%' IDENTIFIED WITH mysql_native_password BY 'your_foo_password';
ALTER USER 'foo'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_foo_password';
Then run the following script
FLUSH PRIVILEGES;
You can find LoopBack 3 project in the following repository. After clonning switch to mysql branch 🙂 or run the following command.