Are you using a registered MySQL version?
What error you are getting?is it access denied or something?
########-###########-#########
for granting a new user you will have to set some privilages in Mysql(scripts/mysql_install_db).also you must connect as the MySQL root user.Then only you will be able to grant a new user.
#########---############-##########
<<
$sql="GRANT SELECT,INSERT,UPDATE,DELETE,INDEX ON userdb TO mama BY '123456'";
>>
i noticed one thing in this query.
here you have not mentioned user(mama)can connect from which host.i don't know whether that may create some problem or not.
i think it should be something like.
mama@localhost- mama can only connect from local host.
mama@'%'-mama can connect from all hosts.
$sql="GRANT SELECT,INSERT,UPDATE,DELETE,INDEX ON userdb TO mama@localhost BY '123456'";
###########-##########-##########
------------------
SR -
shiju.dreamcenter.net
"The fear of the LORD is the beginning of knowledge..."