Using shell script to insert values into a mySql table

I am new to shell scripting and I am trying to use shell scripts to insert values into a mySql database. The issue with the below script is that the script connects to the database and waits for the user prompt (without executing the insert lines).

I want the script to connect to the database AND execute the insert command.

Shell script:

#!/bin/sh
#The objective of this script is to connect to MySql
mysql -h 127.0.0.1 -P 3306 -u root
use test;
INSERT INTO Animals(Legs, Hands)
VALUES (2,3);

Output:

Jane-MBP:nScript Jane$ ./nMysql 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 21
Server version: 5.5.5-10.4.8-MariaDB Source distribution

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> exit
Bye
./nMysql: line 4: use: command not found
./nMysql: line 5: syntax error near unexpected token `('
./nMysql: line 5: `INSERT INTO Animals(Legs, Hands)'
Jane-MBP:nScript Jane$