You have to quote the 'EOF' string for if you want no parameter substitution.
From man bash | less +/"Here Documents"
Here Documents
This type of redirection instructs the shell to read input from the current source until a line containing only word
(with no trailing blanks) is seen. All of the lines read up to that point are then used as the standard input for a
command.
The format of here-documents is:
<<[-]word
here-document
delimiter
No parameter expansion, command substitution, arithmetic expansion, or pathname expansion is performed on word. If any
characters in word are quoted, the delimiter is the result of quote removal on word, and the lines in the here-document
are not expanded. If word is unquoted, all lines of the here-document are subjected to parameter expansion, command
substitution, and arithmetic expansion. In the latter case, the character sequence <newline> is ignored, and \ must
be used to quote the characters , $, and `.
If the redirection operator is <<-, then all leading tab characters are stripped from input lines and the line contain-
ing delimiter. This allows here-documents within shell scripts to be indented in a natural fashion.
So, your script should look like this when you quote the 'EOF' string
mysql <<'EOF'
GRANT ALL PRIVILEGES ON *.* TO "test_mysql_user"@"localhost" IDENTIFIED BY "test_password";
FLUSH PRIVILEGES;
create database cricket;
use cricket;
//created tables
.....
.....
INSERT INTO admin
(
admin_id,
first_name,
middle_name,
last_name,
email_id,
password,
address,
city,
state,
zip_code,
country,
phone_code,
phone_number,
email_campaign)
VALUES
(
'root',
'root',
'root',
'root',
'[email protected]',
'$2b$10$FywS3Lc27let0C9VVvZYFOBYg.AwGA3VEtUs5YIAjjUWSSEI3Fqt2',
'root',
'root',
'root',
'root',
'root',
'root',
'root',
'root');
EOF
If quoting word is not an option for you and want to avoid the parameter substitution just for the encrypted password field, store the encrypted value in a variable and use that variable in the doc.
password='$2b$10$FywS3Lc27let0C9VVvZYFOBYg.AwGA3VEtUs5YIAjjUWSSEI3Fqt2'
mysql <<EOF
INSERT INTO admin
(
admin_id,
first_name,
middle_name,
last_name,
email_id,
password,
address,
city,
state,
zip_code,
country,
phone_code,
phone_number,
email_campaign)
VALUES
(
'root',
'root',
'root',
'root',
'[email protected]',
'$password',
'root',
'root',
'root',
'root',
'root',
'root',
'root',
'root');
EOF