Your syntax is wrong here. Because you're sending the output from the mysqldump command to database.sql, there's no output left to be piped through to gzip. Just remove that bit, so you're only creating the gzipped file: /usr/bin/mysqldump --opt -u root -ppassword database | gzip > database.sql.gz
If you really want to create compressed and uncompressed versions, you'll either need to run two separate commands: /usr/bin/mysqldump --opt -u root -ppassword database > database.sql ; cat database.sql | gzip > database.sql.gz
or use tee to split the output: /usr/bin/mysqldump --opt -u root -ppassword database | tee database.sql | gzip > database.sql.gz