As Gordon Davisson notes, standard Mac OS X 10.6 already has a mysql group, as this command shows:
dscl . -read /Groups/mysql
You shouldn’t create your own mysql group, and any attempts to modify it will affect the _mysql group. But to answer your question, the most succinct way to do it would be this single command:
dscl . -create /Groups/mysql gid 296
To add an encrypted password to the group:
dscl . -passwd /Users/mysql ‘my secret’
Note: Andrea Girardi’s method creates a plaintext password, which isn’t so good.