How to grant all privileges to a user from root user in MySQL on command line
This worked for me:

mysql test -e "grant all privileges on \`test\` to 'testy'@'%' identified by 'pass\!word' with grant option"



Name a database to connect to. In this example I named test before the -e flag. Many SQL statements won't run if you don't "use" a default database.
If you grant the privileges to a database that has special characters (e.g. yours has a dash - character, you need to delimit the database name in back-ticks, not single-quotes.
Back-ticks also have meaning to the shell, that is command-substitution. You need to use backslash to escape the back-ticks so the shell won't do command substitution. The shell will strip off the backslashes before it passes the SQL command to mysql.
If you grant to all the tables in a database, you don't need to use database.*. You can just name the database.
If the password string contains some characters that are special to the shell, you need to backslash those too. For example, ! is the shell character for history substitution.